Just add an action to the controller that provides the image:
def picture(name: String) = Action { Ok.sendFile(new java.io.File(name))
Then add the appropriate route to your routes file:
GET /picture/:name controllers.MyPictureController.picture(name: String)
And your HTML should look like this:
<img src="/picture/image.png">
or if you use Scala templates:
<img src="@routes.controllers.MyPictureController.picture("image.png")">
source share