The Image component displays an image rendition for a given Asset.
Authors have several configurations available to choose which asset rendition is displayed.
Dialog / Configuration
An Image rendition that can be picked from a dropdown that lists all Asset Rendition Names that are registered to Asset Rendition Dispatcher OSGi configurations with
type = image. These values are exposed via Asset Share Commons’ Asset Rendition framework.
OOTB the available image renditions are available:
- Original (maps to static original rendition)
- Web (maps to the static cq5dam.web.x.x.x)
Fallback Image Src
An image can be selected to be used if no rendition for a given asset is found. The fallback image src will be used directly to populate the
src attribute. Even if the fallback image is an asset in the DAM that has a rendition, only the path will be used.
Maximum Image Height (in pixels)
If set, an inline style attribute
max-height will be set to explicitly limit the height the image can grow. If left blank the image will render as is.
In Asset Share Commons v1.8.0 the dialog was updated to use the Renditions provided by the Asset Share Commons’ Asset Rendition framework.
Previous instances of Image components will continue to work and allow configurations in both modes using a Legacy Mode toggle switch.
Any NEW instance of the Image component ONLY supports the Asset Renditions.
Migrating off legacy
It is highly recommended to move to the new Asset Rendition based approached at your earliest convenience. The easiest way to migrate is to:
- Define and configure any required AssetRenditionDispatcher configurations, and promote through QA -> Stage as needed.
- Update AEM Dispatcher configuration to support Asset Renditions.
- Deploy Asset Share Commons v1.8.0+ and any dependency configurations to production environment.
- On AEM Author, navigate to the page with the Image component.
- Enter Edit mode
- Add a NEW Image component above the Image component using the legacy configuration.
- Configure the NEW Image component as needed, and verify it is surfacing the expected rendition.
- Delete the previous Image component using the legacy configuration.
- Double-check everything works as expected on AEM Author.
- Publish the page.
- Double-check the page renders properly on AEM Publish
- Rinse, repeat for all instances of the Image component.
- Sling Model:
Dialog Data Sources
com.adobe.aem.commons.assetshare.content.impl.datasources.AssetRenditionsDataSourcewith a filter of