imgfn templating functions provide useful functions for handling image resources stored in any workspace. They are commonly used to resolve image variations.
Get image variation link
Retrieves a link to an image variation from binary content.
String getImageVariationLinkFromBinary(ContentMap binaryContent, String variation)
String getImageVariationLinkFromBinary(Node binaryContent, String variation)
Either the ContentMap or the Node of the binary you want to render.
An image variation defined in the site theme.
A link to an image variation.
The example above assumes that you have defined an image variation named
240 in your theme.
binaryNodeName is the default name of the subnode that contains the file binary and related information. Use cmsfn to transform this node into a JCR node that can be used in templating function arguments.