Help using a jpg in a shinyapp


#1

I am trying to learn shinyapps and was inspired by eggnogr by Hadley Wickham.

I want to show a picture and it works if I point to an external image.
But I want to put the image inside a www-directory and use that.

img(src = "http://something.jpg")

works for me. but

img(src = "www/something.jpg")

doesn’t work.

The full code can be found at:
https://github.com/MartinMSPedersen/drommekage

Steps to reproduce:

Rscript -e "shiny::runGitHub('drommekage','martinmspedersen')"

#2

Ooh. I manage to solve it myself.
The solution:

img(src="something.jpg")

without the www but still place the something.jpg inside
a www-directory