I have a shiny app with a section that shows images depending on the user input. While it works well on my local machine, when I deploy to shinyapps.io, the images do not show up as I get the following error -
Warning: Error in : [ENOENT] Failed to search directory 'bike_img': no such file or directory
It appears the folder bike_img
is not being detected. I also noticed that when I click the button to publish to shiny, I don't see I do not see the image files included in the file section. So I manually added one of such image files (jpg file at the bottom). When I do so and publish, that particular image shows up.
Here is my app folder structure -
Here is the code in the app that references the bike_img
folder. I list the contents of the directory with the dir_ls()
, then detecting a file that matches a pattern, all within a renderImage()
function
My question is, what do I do to ensure the app is recognizing the bike_img
folder with images? I have over 100 images so adding them manually is a pain.