How to create a custom rendition to the images in the AEM DAM programatically using java in AEM6.3?

Avatar

Avatar

Malarvizhi_Sara

Avatar

Malarvizhi_Sara

Malarvizhi_Sara

16-03-2018

I have a requirement where I need to create a custom rendition for the images in the AEM DAM that has already being uploaded in the DAM and store those custom renditions in the same path of the image in the DAM programmatically using java in aem6.3.

Any idea/approach to proceed as solution to the above questions?

View Entire Topic

Avatar

Avatar

Veena_Vikram

MVP

Avatar

Veena_Vikram

MVP

Veena_Vikram
MVP

16-03-2018

Hi Malar

     I don't know if this is what you are looking for. If the requirement is only to generate a custom rendition when user uploads an image , then you don't need to write any custom code for that as there is already a workflow available which handles the same. 

You can go to workflow manager and DAM Update Asset workflow ; /etc/workflow/models/dam/update_asset.html

1443706_pastedImage_5.png

Double click "Process Thumbnails" step

1443911_pastedImage_6.png

Add your Custom rendition in requested format in the below field .

1443920_pastedImage_8.png

Once set, save your workflow and upload a new image Check the renditions below the uploaded asset and you shud see your new rendition

I have not set it , below image is just for reference to mention that the new rendition will be available in this format.

1443913_pastedImage_7.png

Hope this is exactly what you are looking for . Happy Friday