I want to add a logo to the browser window in the same way as all browser windows are usually displayed:
titlePanel
allows to add easily images to the application title, by using:
titlePanel(title = div(img(src="myAppImage.jpg"), "My App Name")
It is also possible to add the title that should be displayed by the browser window with windowTitle
as a parameter.
However, it does not work when adding an image to the browser window. I tried:
titlePanel(title = div(img(src="myAppImage.jpg"), "My App Name"), windowTitle = div(img(src="myBrowserImage.png"), "My Browser Name"))
. But this gives the following browser name: <img src ...>
What is the correct way of writing it?
Not inside the titlePanel
but you can add following inside the ui:
tags$head(
tags$link(rel = "icon", type = "image/png", sizes = "32x32", href = "/myBrowserImage.png"))
Also you should put the image inside www
folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With