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

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

javascript - Can Piwik report referrer in real time? -