0

Despite renaming my application to app.r and adding a source path to my code the added image turned from blue "?" to a crashed image ! what's the problem with it ? can anyone help me?

here is my code

 ui <- fluidPage( helpText(
      h4("Powerd by")),
      tags$a(href='http://data-expert.net/',tags$img(src="<alidata.png>",height='50',width='120'),align='center'),
     )

    server <- function(input, output) {

      addResourcePath(prefix = "img", 
                      directoryPath = "C:/Users/Ali-Frady/Desktop/STAGE 2/DE")

    shinyApp(ui = ui, server = server)
Ali Fradi
  • 110
  • 1
  • 10
  • images should be placed in `www` folder. www folder should be in the same directory as your app.R – Urvah Shabbir Jul 24 '18 at 06:52
  • also check this out.https://stackoverflow.com/a/46546344/2296728 "the solution is to simply format the Shiny code properly, by naming the R file app.R, and clicking Run App as opposed to selecting all of the code and running within the console." – Urvah Shabbir Jul 24 '18 at 06:53

1 Answers1

0

I've found the solution: It was about putting the image into a file called "www" and this file is at the same directory of the project already

Ali Fradi
  • 110
  • 1
  • 10