logo in shinydashboard

4,499 views
Skip to first unread message

Dawg

unread,
Jun 15, 2015, 6:46:37 PM6/15/15
to shiny-...@googlegroups.com
in the older shiny I could include a logo with
shinyUI(navbarPage(tags$img(src="MyLogo.gif", width="48px")

How do I do this now in shinydashboard?

Dawg

unread,
Jun 17, 2015, 1:36:24 PM6/17/15
to shiny-...@googlegroups.com
Tried html as well, didn't work. Anybody know what to do? I feel stupid...

HTML('<img src="MyLogo.gif" alt="Logo" height="42" width="42">')

Joe Cheng

unread,
Jun 17, 2015, 1:38:40 PM6/17/15
to Dawg, shiny-...@googlegroups.com
It seems like the tags$img should've worked. What do you see?

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/3fb8a285-39ab-44ee-b379-983325e5b0eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dawg

unread,
Jun 17, 2015, 1:51:40 PM6/17/15
to shiny-...@googlegroups.com, dag.l...@katrisk.com
Here's what I get:
tags$img(src="MyLogo.gif", width="48px")
Error in FUN(X[[1L]], ...) : Expected tag to be of type li

ignacio martinez

unread,
Jun 18, 2015, 7:22:40 AM6/18/15
to shiny-...@googlegroups.com
This works for me:

library(shinydashboard)

dashboardPage(skin = "red",
  dashboardHeader(title = img(src="logo.jpg", height = 50, align = "right")),
  dashboardSidebar(fileInput('file1', 'Choose CSV File',
                             accept=c('.csv'))),
  dashboardBody()
)

Dawg

unread,
Jun 18, 2015, 12:22:29 PM6/18/15
to shiny-...@googlegroups.com
that worked. Thanks!

Izabela Paulino

unread,
Dec 22, 2017, 8:36:16 AM12/22/17
to Shiny - Web Framework for R
Hello! I would like to know the process that you have to do in order to make this line "title = img(src="logo.jpg", height = 50, align = "right")" work in your script! I put an image .png into the www folder, and this line in my code, but where should be the image just shows a square with a "?" in the middle (image attached). Can you please help me?
imageproblem.png
Reply all
Reply to author
Forward
0 new messages