title: How to show different images according to selectInput in Shiny?
body: <p>I have an app that shows population models with a dropdown menu to choose the species. A plot of that species' model will be rendered and now I want an image of the species next to that plot. 
  The plot will change when the dates or location is changed, but the image next to it should only react to the select species input.</p>
  
  <p>I've written this code for it:</p>
  
  <pre><code>ui &lt;- fluidPage(
   # ... rest of the code
    wellPanel(
      fluidRow(
        column(3, selectInput("populatie", label = h4("Populatie"), 
                          choices = list("PERENBLADVLO" = "PER", "OORWORM" = "OOR", "FLUWEELMIJT" = "FLU"),
                          selected = "PER"),
               imageOutput("img1")), # here is the image
        column(9, plotOutput("plot2"))
      )
    )
  )
  
  server &lt;- function(input, output){
   # ... rest of the code
    output$img1 &lt;- renderImage({
      if(input$populatie == "PER"){            
        img(height = 240, width = 300, src = "PBV.jpg")
      }                                        
      else if(input$populatie == "OOR"){
        img(height = 240, width = 300, src = "OW.jpg")
      }
      else if(input$populatie == "FLU"){
        img(height = 240, width = 300, src = "FM.jpg")
      }
    })
   # ... rest of the code
  }
  </code></pre>
  
  <p>What I get is an error saying "invalid filename argument". 
  I can render the images on their own though without a selection.</p>
  
  <p>Thoughts?</p>