Closed vikram-rawat closed 7 years ago
If you have a reproducible example, I can take a look at it. But without more to go on, I don't know what the problem might be. For the example below, I have a www folder and an image named "porto.jpg" inside it. Given that, this works just fine for me:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = tags$div("Porto", tags$img(src = "porto.jpg", width = "30"))),
dashboardSidebar(),
dashboardBody()
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
If I misunderstood your problem, please give a reproducible example and more description and I can reopen the issue.
This is the App I was trying to write. there is nothing important in there it's just a learning app. You can ignore everything else apart from the title option.
This is how it looks like on my screen. I have no idea what's going wrong. can you please please please help.
and this is what I got for using
dashboardHeader(title = tags$div("Porto", tags$img(src = "boosthubs.png", width = "30")))
It works fine for me, without any changes to the code you attached:
Are you running the app by clicking "Run App" or copy pasting the code into the console? The latter might not work.
So I don't know what your problem may be... Here's my output of devtools::session_info()
(click on the arrow to expand):
Update the relevant packages to at least what I have and see if the problem persists. Please also post the output you get when you do devtools::session_info()
(after you click "Run App" and close it).
I tried using
Title=tags$a( tags$img(src='nameofmyimage.png',width=180) )
Somehow it doesn't work in one scenario and it does in another. It just doesn't find the image. Same code and same image is used in both dashboards. It is my logo.
Is there any better method for inserting images in main baar