Embedding Image in Shiny App

kay picture kay · Feb 24, 2014 · Viewed 70.7k times · Source

I've been working on a shiny app and would like to include a logo in the upper right corner of the app. How can I easily embed an image using shiny and r?

Thanks! K

Answer

kay picture kay · Feb 24, 2014

I found another option that looks good for this app, so I'm sharing for others who want the image in the mainPanel.

mainPanel(
   img(src='myImage.png', align = "right"),
  ### the rest of your code
  )

Save the file in a www directory in the shinyApp directory:

 | shinyApp/
    | ui.R
    | server.R
    | www/
       | myImage.png