I'm trying to put a static image into a Shiny app. I have created a folder called www in the working directory of my Shiny app and put a PNG file there. Using the following code should show the image:
library(shiny)
ui <- fluidPage(
tags$img(src='photo.png')
)
server <- function(input, output) {}
shinyApp(ui=ui, server=server)
But instead I have this:
Querying the image URL (http://127.0.0.1:7122/photo.png) directly shows a 404 status code.
The outcome is the same regardless of whether I start the Shiny app by running the code manually, clicking the "Run App" button in RStudio, or executing the file via Rscript app.R on the command line.
Here is the folder structure:
.
├── app.R
└── www
└── photo.png
Am I missing something?

/. By contrast, adding a new resource prefix viaaddResourcePathworks./.