routes
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
public :
<body background="@routes.Assets.versioned("images/my-image.jpg")">
<body background="/assets/images/my-image.jpg")">
.
If you want to change the “assets” to “public” or any other , just change it in the file routes:
GET /public/*file controllers.Assets.versioned(path="/public", file: Asset)
Then your assets will be available along the way public, for example:
<body background="/public/images/my-image.jpg")">
However, it @routes.Assets.versionedwill be the same:
<body background="@routes.Assets.versioned("images/my-image.jpg")">
That is why it @routes.Assets.versionedis the preferred method.
source
share