DAM JCR Fastly renderer module

Edition

Incubator (services)

Issues

Git

Git

Latest

1.0.9

Compatible with Magnolia 6.2.40.

The DAM JCR Fastly renderer module provides an extension to the DAM JCR connector, adding the option to use renditions generated by the Fastly Image Optimizer instead of using the renditions generated by Magnolia.

This module is at the INCUBATOR level.

Installing with Maven

Maven is the easiest way to install the module. Add the following to your bundle:

<dependency>
  <groupId>info.magnolia.dam</groupId>
  <artifactId>magnolia-dam-jcr-fastly</artifactId>
  <version>1.0.9</version>
</dependency>

Configuration

Renditions are configured in the config.yaml file of the module. You can decorate it using a custom light module or use the Resources App to add more renditions. The renderer generates a link to the dam servlet adding in the query string parameters configured for the rendition.

For more on asset renditions in Magnolia, see the DAM API’s AssetRenditions and MediaTypes.
config.yaml
renditions:
  width-960: width=960&crop=16:9,smart (1)
  thumbnail: crop:1:1,smart&width=64 (2)
1 The link generated for the width-960 rendition would be /dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-edmonds-441220-unsplash.jpg?width=960&crop=16:9,smart.
2 The link generated for the thumbnail rendition would be /dam/jcr:78399215-aed5-4518-9cfc-9b39855f4740/ash-edmonds-441220-unsplash.jpg?crop:1:1,smart&width=64.

Dynamic renditions

The module support dynamic renditions that does not need to be predefined. So if you try to obtain the following rendition 400x200, it will generate a link using the parameters width=400&height=200.

The following related parameters can be configured too:

enableDynamicRenditions: true (1)
extraDynamicRendition: crop:1:1,smart (2)
1 Setting enableDynamicRenditions to false will disable dynamic renditions.
2 In extraDynamicRendition, you can include any parameter that will be always used for generating dynamic renditions. For instance, having the above configuration, the rendition 400x200 will generate this link: width=400&height=200&crop:1:1,smart.

Ignore imaging

By default, if you try to use an undefined rendition, the renderer tries to use a rendition from Magnolia. If you want to always use the original image (from Magnolia) in these cases, you can configure the ignoreImagingRenderer property to true.

ignoreImagingRenderer: true

Disable for author

By default, this module is disabled in the author server. If you want to enable it in the author server, you can set this property:

disableForAuthor: false (1)
1 If left undefined or set to true, the module will remain disabled for the author server.

Safe Crop

By default values for the crop area are respected, could be that it fall out of rendering area and the image is not rendered, in order to work around that and get the image rendered there is a flag safeCrop that can be set to true so the image is rendered although area might not be what was defined.

Changelog

Version Notes

1.0.9

Render original if area is 0.

1.0.8

Add safe crop flag.

1.0.7

Focal area width whitelisting.

1.0.6

Focal area fixes.

1.0.4

Support focal area.

1.0.1

Small fixes.

1.0

Initial release.

Feedback

Incubators

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DAM JCR Fastly renderer module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules