问题
My logo is getting displayed locally on R shiny, but when i deploy my app to shinyapps.io (Check the app here), the logo shows a blank picture. Can someone please help me out?
The blank logo
My code
library(dplyr)
library(shiny)
library(shinythemes)
library(rpivotTable)
#UI
ui = fluidPage(img(src='capture5.png', height = 70, width = 120),
img(src='capture6.png', height = 70, width = 120),
fluidRow( rpivotTableOutput("pivot")))
#Server
server = function(input, output, session) {reactive({
mtcars %>% select(cyl, carb, vs, mpg) %>% group_by(carb,vs ) %>% summarise(mpg=sum(mpg))})
output$pivot <- renderRpivotTable( rpivotTable::rpivotTable(mtcars, rows = c( "vs"),cols=c("carb"), vals = "mpg", aggregatorName = "Sum", rendererName = "Table", width="50%", height="550px"))}
shinyApp(ui = ui, server = server)
回答1:
I tested on my side and seemed able to view images. I followed the procedure in the image below. Please confirm if this is what you did or whether this perhaps works for you?
After selecting the publish icon I made sure that the 2 images were checked (they were by default) and then published the app. I saved the image files in the www folder.
来源:https://stackoverflow.com/questions/53059211/logo-image-is-not-getting-displayed-on-shinyapps-io