Expand my Community achievements bar.

SOLVED

AdpativeImageServlet not working for PNG images

Avatar

Level 3

Hi Team,

 

AEM 6.5

 

sling:resourceSuperType="core/wcm/components/image/v2/image"

 

 

Adaptive ImageServlet picks right renditions/width for images of type JPEG.

 

PROBLEM:

 

But it works exactly opposite in case of PNG file. It increases the size of the rendered image relative to the size of the original image.

 

E.G:

 

heroimage.coreimg.82.700.png - 172 kb
heroimage.coreimg.82.600.png - 564 kb
heroimage.coreimg.82.500.png - 411 kb
heroimage.coreimg.82.400.png - 281 kb
 

 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @arvindpandey 

 

Can you please try following ?

Optimizing Rendition Selection

The Adaptive Image Servlet will try to pick the best rendition for the requested image size and type. It’s recommended that DAM renditions and Image component allowed widths are defined in sync so that the Adaptive Image Servlet does as little processing as possible.

 

Basically create multiple png renditions with the necessary width via Asset workflow. And then try using this image. In that case AdaptiveImage Servlet might use the png of the appropriate size directky from DAM


Aanchal Sikka

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @arvindpandey 

 

Can you please try following ?

Optimizing Rendition Selection

The Adaptive Image Servlet will try to pick the best rendition for the requested image size and type. It’s recommended that DAM renditions and Image component allowed widths are defined in sync so that the Adaptive Image Servlet does as little processing as possible.

 

Basically create multiple png renditions with the necessary width via Asset workflow. And then try using this image. In that case AdaptiveImage Servlet might use the png of the appropriate size directky from DAM


Aanchal Sikka