Logo / Image is not getting displayed on shinyapps.io

天涯浪子 提交于 2019-12-23 01:01:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!