Image component PNG handling

100 views
Skip to first unread message

Kamal Chalikonda

unread,
May 1, 2020, 8:29:24 PM5/1/20
to AEM Core Components Developer Community
Hello

I'm noticing that when I use PNGs with Image based components, the scaled PNGs are sometimes larger in size than my original file. 

For example, the original PNG image size is 172 KB and is 700x738. Below is what I observe.

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
heroimage.coreimg.82.300.png - 169 kb
heroimage.coreimg.82.200.png -  80 kb
heroimage.coreimg.82.100.png -  23 kb

As you can tell, I am using 82 as the quality. I don't think this has any effect on PNGs anyway.


I'm going crazy with this. It is working as expected for JPEGs. Only PNGs behave this way.

Can someone please help?

thanks
-kamal

 

Gilles Knobloch

unread,
May 2, 2020, 4:25:47 AM5/2/20
to aem-core-co...@googlegroups.com
Hi Kamal,

Can you please file an issue under https://github.com/adobe/aem-core-wcm-components/issues with how to reproduce?
If possible, please attach the file that you're observing this with.

I've quickly tested the output of our WKND.site, and not seeing the files becoming bigger than original

Regards,
Gilles

--
You received this message because you are subscribed to the Google Groups "AEM Core Components Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aem-core-componen...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aem-core-components-dev/4f26b41c-bda6-4eb3-9223-2f1795241672%40googlegroups.com.

Vlad Băilescu

unread,
May 2, 2020, 8:09:51 AM5/2/20
to aem-core-co...@googlegroups.com
Hi Kamal,

It would be useful to also attach a PNG for which the issue is reproducible. My initial hunch is that this might happen only for heavily optimized source PNGs.

Best,
Vlad

--
Sent from mobile

Kamal Chalikonda

unread,
May 4, 2020, 1:04:00 PM5/4/20
to AEM Core Components Developer Community
Hello

Thanks for your quick responses. I did some more testing and found that it is only happening to highly optimized PNGs as Vlad mentioned. I no longer consider this a bug. We were using images that were huge to start with. Once we reduced the resolution and stopped optimizing them, things are working as expected. In case you still want to do something about this, I optimized the WKND image that Gilles referenced and it does have the behavior I originally mentioned (smaller width files being larger in size). Please find that image attached.

Thanks again for your help. Just that hunch about 'highly optimized images' helped me find a solution and move along.

-kamal

To unsubscribe from this group and stop receiving emails from it, send an email to aem-core-components-dev+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "AEM Core Components Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aem-core-components-dev+unsub...@googlegroups.com.
--
Sent from mobile
article_01_hero.png
Reply all
Reply to author
Forward
0 new messages