I am trying to add a logo on the top right corner of my shiny dashboard, however it appears a question mark. I have tried changing the height and width of the logo but it does not work. When you click on the logo it takes you to a website which does work but unable to see the logo on dashboard.
I have referenced to all these following articles but none of it could resolve my issue
Adding a company Logo to ShinyDashboard header
Image not showing in Shiny app R
R shiny - image does not appear
This is the code I have written so far my dashboard header
library(shiny)
library(shinydashboard)
library(dplyr)
library(ggplot2)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody()
)
server <- function(input, output) {}
#Dashboard header carrying the title of the dashboard
header <- dashboardHeader(title="Dashboard"
,tags$li(class = "dropdown",
tags$a(href="https://www.mbm.net.nz/",
tags$img(height = "20px", src="Ascibe_logo.jpg", width = "200px")
)),
dropdownMenu(type = "messages",
messageItem(
from = "Sales Dept",
message = "Sales are steady this month."),
messageItem(
from = "New User",
message = "How do I register?",
icon = icon("question"),
time = "13:45"),
messageItem(
from = "Support",
message = "The new server is ready.",
icon = icon("life-ring"),
time = "2014-12-01")),
dropdownMenu(type = "notifications",
notificationItem(
text = "5 new users today",
icon("users")),
notificationItem(
text = "12 items delivered",
icon("truck"),
status = "success"),
notificationItem(
text = "Server load at 86%",
icon = icon("exclamation-triangle"),
status = "warning"
)),
dropdownMenu(type = "tasks", badgeStatus = "success",
taskItem(value = 90, color = "green",
"Documentation"
),
taskItem(value = 17, color = "aqua",
"Project X"
),
taskItem(value = 75, color = "yellow",
"Server deployment"
),
taskItem(value = 80, color = "red",
"Overall project")))
Can anyone please help me to get this issue resolved.
Thanks a lot in advance!!
www
in the working directory? If not, create a folder withwww
name and paste all your images in that folder. – msr_003