I am using the image processing feature of Hugo to add responsive image to my website.
Everything is working perfectly and this is an awesome feature! But, while looking at the network data
on my website, I noticed that resized PNG images are bigger than the original.
For example, with an image called “apercu-slack.png”:
the original is 1280x920px and weight 26ko
the medium version generated by Hugo is 1024x736px and weight 60ko
the small version generated by Hugo is 600x431px and weight 30ko
Is it to be expected? Is there a parameter to tweak the quality of the generated PNG?
It’s not totally surprising, as PNGs can be compressed (and in Photoshop there is even an option to output 8 bit files). We currently use the default (Go) compression settings when encoding PNGs.
To put it in perspective, the “original” which you uploaded to Discourse: