Highlighted

AEM 6.4 | OOB Image rendition create high file size image

mohammedm272583

26-12-2018

Hi Support team,

We are using AEM 6.4 version and creating Image rendition from OOB functionality, the issue is we are adding a small file size image and after the renditions were created the rendition images more than actual size, for example 400 KB the rendition images are 3MB.

Is there any service pack which will resolve this issue or should we need to do anything with respect to creating a rendition?

Thanks

Mohammed Mansoor

Replies

Highlighted

Gaurav-Behl

MVP

27-12-2018

I tested with a small image didn't observe this issue with 6.4.2 & 6.4.3 SP and all the generated renditions are in KBs.

Can you share the steps/screenshots/logs about this issue?

Highlighted

mohammedm272583

27-12-2018

Hi Gaurav,

Thanks for your reply, I have attach the screenshot below, the original is 215kb which is Jpg format and after the dam workflow is triggered the png files have these sizes. I have used OOB workflow to create the renditions,but somehow its creating the higher image. Am using

Adobe Experience Manager (6.4.1.0).

Thanks

Mansoor

1655360_pastedImage_6.png

1655358_pastedImage_3.png

Highlighted

Gaurav-Behl

MVP

27-12-2018

I was able to reproduce the mentioned behavior. First, let's try to understand why does it happen -

Say you have an image of x:y dimensions with some aspect ratio and some resolution (pixels per inch). You can resize (either downsize or upsize, downscale or upscale, resampling etc.) an image via

  • maintaining the aspect ratio or otherwise
  • maintaining the resolution or otherwise
  • other algorithms/terminologies in computer graphics

When you upsize/upscale an image, it adds more pixels to the existing image which is bound to increase its size.

com.day.cq.dam.handler.impl.process.ResizeImageProcess is configured to use "Maximum size" algorithm in OOB configuration to give the best results for generated image rendition.

Typically, a large, good quality image is generated via Photoshop/Illustrator etc. and then downsized in AEM because the lightweight java API doesn't provide a lot of features (usually just the quality and size of renditions) to play around with.

Now coming back to solutions:

1) Use the "minimal size" option in the arguments available keeping in mind that you can't modify the quality of image but the aspect ratio depending on mentioned width-height. This would still be more than the size of original image.

2) Ask your marketing team to provide with the good quality, largest rendition and then use the ThumbnailProcess step to downsize the large image to small images with the ability to control quality of renditions and center of image flag etc.

3) You may use another Image Processing java API to write custom code based on requirements.

API Reference: Workflow Process Reference - Assets

1655382_pastedImage_16.png

1655383_pastedImage_17.png

1655486_pastedImage_18.png

Hope that helps.

Highlighted