i am currently building a website and do experience some performance issues for the thumbs: the JPG files are output as WEBP thumbs with the correct (smaller) size, which is specified in a srcset in the .config. For PNGs, the srcset is also created and the images are displayed as .webp files BUT they are the original size (which is too big) and when downloading it’s still a PNG file. So the srcset doesn’t have any effect on them.
I have Image Magick as driver:
'thumbs' => [
'driver' => 'im',
'srcsets' => …
Do I have to specify the location of the Image Magick or manually install it? PHPinfo shows that the imagick module (3.7.0) is enabled. Server (PHP 8.1) is running on GoDaddy.
Also, since the srcset works for JPG image I guess Image Magick is working, isn’t it?
Hm, in general it seems to work, even for some of the png files.
The PHP imagick module is irrelevant here, Kirby uses the ImageMagick library on the CLI (as separate software which needs to be installed on the server and seems to be present, otherwise the thumbs wouldn’t be created).
If I recall correctly, someone else recently had a similar issue which only affected .png files but not all.
Hi there,
I just stumbled across your question and someone I know just had the same issue (I guess). We found out that the color-profile in the png-file was the issue. The files had just normal sRGB profile embedded, but this was causing the trouble.
That’s really interesting. I think with imagick it’s possible to remove profiles from images—but I don’t have a good idea how to integrate this in Kirby.
Sorry but I don’t know how to do that, he just resaved the images with Photoshop. But with al large amount of images this probably not the best solution.
Could probably batch process the files to fix the profiles with a tool like xconvert.
I’ve done it in the past recursibely on the command line with imagemagick, and got it to rip through the kirby content folder. Unfourtantly i cant remember the exact command but a bit of googling should sort it.