1
votes

I know that while uploading any Image/Asset into AEM DAM will create the renditions, but am wondering that how these renditions are going to be used?

Generally when doing content authoring we will be pointing to the DAM asset paths only, but never saw using particular renditions paths of the image. can anyone help me to give an example for using this renditions.?

dam renditions

2
have a look at how to access image rendition which might be similar to your question.VAr

2 Answers

3
votes

The most common use case it to have "responsive" images by making use of the picture element (requires polyfills like picturefill.js when used with IE).

Here's an example taken from the Adobe documentation on Adaptive images:

<div data-picture>
    <div data-src='/content/dam/geometrixx-media/articles/meridien.png'></div>                                        
    <div data-src='/content/dam/geometrixx-media/articles/meridien.png/jcr:content/renditions/cq5dam.thumbnail.319.319.png'    data-media="(min-width: 769px)"></div>  
    <div data-src='/content/dam/geometrixx-media/articles/meridien.png/jcr:content/renditions/cq5dam.thumbnail.140.100.png'   data-media="(min-width: 481px)"></div>     
</div>

As a result, the appropriate image will be rendered for the viewport breakpoints defined in data-media.

0
votes

You can also consider using Named Transform Image Servlet that comes with acs-aem-commons package. It is handy to control many aspects of the image dynamically using just the image URL.

https://adobe-consulting-services.github.io/acs-aem-commons/features/named-image-transform/index.html