1

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 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)
Eli Berkow
  • 2,628
  • 1
  • 12
  • 22
Sid
  • 53
  • 8
  • 3
    The server responds with a `404` error, meaning it doesnt know where the image is, make sure it is in the `www` folder – Pork Chop Oct 30 '18 at 07:35
  • 1
    Possible duplicate of [unable to place logo / image in Shiny App](https://stackoverflow.com/questions/53053598/unable-to-place-logo-image-in-shiny-app) – Wilmar van Ommeren Oct 30 '18 at 08:30
  • Wilmar, I believe this is a follow-up from that question specifically aimed at deploying to shinyapps.io. The previous question dealt with a local shiny instance. – Eli Berkow Oct 30 '18 at 15:01

1 Answers1

2

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?

process

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.

Eli Berkow
  • 2,628
  • 1
  • 12
  • 22
  • Thanks mate, i used the codes and secret digit to publish my app because the method you displayed doesn't work in my R studio due to unforseen reason. Thanks again for your efforts :) – Sid Oct 31 '18 at 17:43
  • 1
    Hi Eli, i got a new situation now, can you pls look into following link, thanks. https://stackoverflow.com/questions/53100944/shinyapps-io-takes-very-long-to-load-my-app-and-then-says-server-disconnected – Sid Nov 01 '18 at 15:48