(Quick Reference)

asset:assetPath

Description

Returns the runtime URL of an asset. This tag automatically handle swapout of cache digest names during production use as well as any custom URL mapping changes, e.g.

<link href="${assetPath(src: 'manifest.json')}"/>

Attributes

NameRequiredDescription
srcYesPath to the asset from grails-app/assets (excluding the first subdirectory)
absoluteNoIf truthy, an absolute URL will be returned. By default, a relative URL is used.