r - How to load an image in Shiny -


i display image in shiny app can't find path have give.

my app structure following :

app>   server.r   ui.r   wwww>     images>       image.png 

and have following code :

ui <- fluidpage(   tags$div(img(src = "www/images/image.png")) )  server <- function(input, output) {}  runapp(list(ui = ui, server = server)) 

it doesn't work.

i tried lot of syntax path,

options("shiny.port" = 8080) img(src = paste0("http://127.0.0.1:", getoption("shiny.port"), "/www/images/image.png"))

but i'm realy struggling disply image, in html inspector have "failed load given url". if have ideas... !

nb : i'm able load css same syntax (i.e. tags$style("www/css/style.css"))

it should works without "www/" prefix : img(src = "images/image.png")


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

mysql - FireDac error 314 - but DLLs are in program directory -

python - build a suggestions list using fuzzywuzzy -