I am having a similar issue. The image is reactive and works fine locally with this:
Original Code (with images in main /app folder):
output$img <- renderImage({
pic <- switch(input$member,
"Person1" = "per1.png",
"Person2" = "per2.png",
"Person3" = "per3.png",
"Person4" = "per4.png",
"Person5" = "per5.png")
list(src=pic,height=150)
},deleteFile=FALSE)
Looking at Winston's code, I attempted to fix with this:
Adjusted code that still doesn't run (with images in main /app folder):
output$img <- renderImage({
pic <- tempfile(switch(input$member,
"Person1" = "per1.png",
"Person2" = "per2.png",
"Person3" = "per3.png",
"Person4" = "per4.png",
"Person5" = "per5.png"))
list(src=pic,height=150)
},deleteFile=FALSE)
The app deploys to
shinyapps.io fine and all text (code not included) runs fine, just no picture shows up. What else do I need to do to correct this?