I'm struggling to display a logo (logo.png
) in the navbarPage
of an R Shiny app. I followed the advice/instructions I found in the internet (for example here, here, here or here and even here) and in principle, it seems to work. At least the title appears and the padding is respected. However, only a placeholder is shown instead of the actual png and if you view the image it says "Not Found":
The structure of the app is as follows:
global.R
ui.R
server.R
www/img/logo.png
The code (located in ui.R
):
shinyUI(
navbarPage(
title = div(img(src = "logo.png",
filetype = "image/png",
style = "margin-top: -14px;
padding-right: 20px;
padding-bottom: 10px"),
"Title",
tabPanel("Some",
...),
...
)
)
I have the suspicion that the issue is somehow related to the structure of the Shiny app (I also tried with the full path of the logo www/img/logo.png
without success), but I fail to figure out where.
Would be great if anyone could give me some advice or hint. Thank you :)