How to add a my company Logo in R Shiny - material

Dear Community,

I do have trouble in placing my company Logo to the R Shiny material dashboard.
Kindly help me on the same.

Thanks and regards,
Sarvesh

Here is a minimal example of placing an image in a shiny app. In the folder containing the app.R file, I made a folder called WWW and in that I placed a file called MyImage.jpg.

library(shiny)

ui <- fluidPage(
  
  tags$img(src = "MyImage.jpg")
  
)

server <- function(input, output) {
  
}

shinyApp(ui = ui, server = server)

Here is a version with the image in the title panel.

ui <- fluidPage(
  titlePanel( div(column(width = 6, h2("My Header")), 
        column(width = 6, tags$img(src = "MyImage.jpg"))),
        windowTitle="MyPage"
  )
)
  

server <- function(input, output) {
  
}

shinyApp(ui = ui, server = server)
4 Likes

Thanks for your reply!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.