Expand my Community achievements bar.

SOLVED

How to get the dynamic renditions of the image?

Avatar

Level 5

Hi,

Does dynamic renditions of image gets stored in crxde? Is there anyway to get the dynamic renditions of image via java code instead of viewing it in the frontend of aem.

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You should try ACS commons Named Transform Image Servlet [1] to generate renditions dynamically. The generated renditions will not be saved in CRX, rather you can cache them on dispatcher/CDN/Client browsers.

 

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/named-image-transform/index.htm...

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @keerthana_hn 

 

Can you please let me know what you mean by dynamic rendition? 

 

If you are just trying to get the renditions of the images stored in crxde that are created via workflow, you can use the below code: https://www.tabnine.com/code/java/methods/com.day.cq.dam.api.Asset/getRenditions

 

List<Rendition> renditions = asset.getRenditions();

 

Hope this helps!

 

Thanks,

Kiran Vedantam.

 

Avatar

Community Advisor

If you want them to be refered in the BE code, you can try the example that I have shared.

Avatar

Community Advisor

@keerthana_hn hope are trying to get dynamic rendition urls and display them on your webpage, you can refer to AEM Image Core component implementation class for reference.

 

https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/w...

 

 

1. Check if image synced to scene7

2. If yes formulate base scene7 url and then use preset based on usagecontext <scene7domain>/is/image/accountname/image filename?$imagepresetname$

Avatar

Correct answer by
Employee Advisor

You should try ACS commons Named Transform Image Servlet [1] to generate renditions dynamically. The generated renditions will not be saved in CRX, rather you can cache them on dispatcher/CDN/Client browsers.

 

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/named-image-transform/index.htm...