I want to load an image, to my RShiny application. The image is hosted in an api in Rstudio connect. The api was created using plumber.
I used the following code to load the image:
library(httr)
val <- GET(url ="url for the image",
add_headers("Authorization" = "Key my-api-key"))
image<-img(src = paste(val),width="100px",height="100px")
However, when I deploy the RShiny application, the image appear as a broken image. I tried with several other images that available online, and they seem to be working fine.
Any help is appreciated regarding this.