Cropped png bigger than original image

Hello,

I have a 55Ko - 450x450px png image in the panel page.

To show it correctly in front page I use thumb and crop option (426x426)

but if I download the new thumbnail, new size is correct but weight image is now about 146Ko :frowning:

Am I doing something wrong ?

I think this can in fact happen sometimes with very small images. You could try to create a thumb with a lower quality.

now my-image-426x426-q30.png weight is now 157ko :frowning:

I don’t think it comes from small image. I tried with the same image with 800x800px, and problem is the same.

Are you using the GD library or IM?

default GD for the moment, I will try IM.

Issue happens only with png images.

It seems to be the same result with IM

When the source image is minified you will probably get a larger file size after creating a thumb. This is because kirby does no extra minification magic with cropped images.

I would expect if you minify the thumb manually after cropping (e.g tinypng.com or similar) you will get a smaller size than the original.

There are some plugins around that would help you do that on thumb creation.

https://github.com/fabianmichael/kirby-imagekit (commercial Kirby Plugin) seems to have optimizers included.