0

I'm trying to add the icon of my app in the browser bar (like all the known icons the pic).

enter image description here

My app consists of modules, so that the code of the main ui looks as follow:

    ui <- dashboardPage(dashboardHeader(title = ...),
          dashboardSidebar(disable = TRUE),
          dashboardBody(
            tabBox(
                tabPanel(title = "first tab",
                         myModuleIO("first tab")),
                tabPanel(title = "second tab",
                         myModuleIO("second tab"))
            )
          )
     )

I tried already the solutions in Display Icon in the title bar of Shiny app page but it showed the code instead of the image;

I tried to add the line

title = div(img(src = "myapp.png"), "My app name")

once in the dashboardPage directly

ui <- dashboardPage(
     title = div(img(src = "myapp.png"), "My app name"))

that showed the text "div(..)" instead of the pic; also I tried to put it inside the tabPanel or in the fluidPage underneath my module (inside the tabPanel) again only the code is shown ... could anyone help please?

thanks

Edit the tags$link in the link above also didn't work that's why I said I tried it!

H.Hasani
  • 79
  • 1
  • 8
  • The existing question you pointed to used `tags$link(rel = "icon", type = "image/gif", href ="...")` to get that to work. You don't seem to be using `tags$link` at all. The icon is set via a `` tag, not the page title. – MrFlick Aug 09 '22 at 18:51
  • I forgot to mention that I did try the tags$link but that didn't work either. – H.Hasani Aug 09 '22 at 18:57
  • Please show the code where you attempted to use `tags$link` so we can find any possible problems. Again, the icon has nothing to do with the page title. It's a separate property usually called the "favicon" – MrFlick Aug 09 '22 at 20:46

0 Answers0