Rstudio shiny not finding image in www folder

r, shiny

Solution

Your code is fine it is just that the permission on the logo.png file does not allow regular user to see it. Try chmod 664 /var/shiny-server/www/sortable/www/logo.png from the command line

You don't need to specify www/ here so the following works:

img(src=paste0(page_name,".png")),

Problem

I've got this code from a previous working example: ``` page_name="logo" shinyUI( pageWithSidebar( headerPanel('Sortable list'), sidebarPanel( tags$head(tags$script(src = "js/jquery-ui.min.js")), wellPanel( uiOutput('sortable_rui') ), wellPanel( uiOutput('sortable2_rui') ), wellPanel( h5(page_name), img(src=paste0(page_name,".png")), img(src=paste0("www/",page_name,".png")) ) ), mainPanel( tableOutput('showData'), verbatimTextOutput('showorder'), tableOutput('showData2'), verbatimTextOutput('showorder2') ) ) ) ``` And here is what I've got inside the `www/` folder: ``` avilella@ubuntu64:/var/shiny-server/www/sortable/www$ ls -l total 76 drwxrwxr-x 2 avilella avilella 4096 Jan 30 09:26 js -rwxrwx--- 1 avilella avilella 67022 Feb 10 14:47 logo.png -rw-rw-r-- 1 avilella avilella 299 Jan 30 09:26 sort.css ``` Yet it's not finding the logo inside `www/`: Any ideas?

Original source