I have a shinydashboard app in which I display an image. Everything appears to work normally but the image file is no longer in the WWW sub directory immediately after I start the app and, obviously, a second launch of the app fails to display it. A simplified version is below. My shiny is down level 1.2.0 (staying with what a customer site has) and shinydashboard is version 0.7.1. My OS is Linux Mint 18.3
If I use the img() function, this does not seem to happen.
Has anyone seen such a thing before? I guess I hope I am doing something silly and just can't see it at the moment.
library(shiny)
library(shinydashboard)
ui <- dashboardPage(title = "Test",
dashboardHeader(
title= "Test"
),
dashboardSidebar(
sidebarMenu(
menuItem("Image", tabName = "Img")
)
),
dashboardBody(
tabItems(
tabItem(tabName = "Img",
imageOutput("image1"))
)
)
)
server <- function(input, output) {
output$image1 <- renderImage({
list(src = "WWW/Profile2.JPG",
contentType = "image/jpg",
width = "80%",
height = "auto"
)
})
}
shinyApp(ui = ui, server = server)