I want to display an image which path is gathered from a database while using the Playframework.
The normal way to gather img src is via the assets route right?:
@routes.Assets.at
To get the img src I need to do this:
@champion.getIcon
So in total I want something like this:
@supports.map { champion =>
<img src="@routes.Assets.at(@champion.getIcon)" alt="@champion.getName" />
}
Obviously this is not working, so I am asking how to do this instead. Of course I could change the img srcs in the database to the asserts/images/... but I think this is not the optimal solution
Aucun commentaire:
Enregistrer un commentaire