AdpativeImageServlet not working for PNG images | Community
Skip to main content
Level 3
October 10, 2023
Solved

AdpativeImageServlet not working for PNG images

  • October 10, 2023
  • 1 reply
  • 523 views

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
 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

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

1 reply

aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
October 10, 2023

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