I am trying to insert a logo on my shiny page.
Here is a reproducible example:
app.R file:
setwd(".../shinyApp")
source("ui.R")
source("server.R")
shinyApp(ui, server)
I use the runApp button to run the app
ui.R file:
ui <- shinyUI(fluidPage(
titlePanel("Blabla"),
sidebarLayout(
sidebarPanel(
sliderInput(inputId="min",
label="Values",
min = 10, max = 100, value = 10,sep=" "),
h6("Done by:"),
img(src='logo.png',height=50,width=50)
),
mainPanel(
h1("Main title"),
p("First paragraph"),
h2("Subtitle"),
p("Second paragraph"),
tableOutput("table")
)
)))
But this does not work ... I have a question mark error instead of my logo as if R could not find my image. The question mark is rightly located in my sidebarPanel though (and the text "Done by" appears).
I have put my image in a www directory since I have read in many places that it was a solution (here for ex: Image not showing in Shiny app R).
My shiny app structure is the following :
an app.R file:
a shinyApp directory containing : my ui.R, my server.R and the www directory which contains my logo.png
I have no idea what I have done wrong ... can anyone please help ? Many thanks !