Thumbs and colour loss


So I’m having some issues with loosing colour information when using the thumb() or the resize() function. I’m guessing this has to do with an issue which seems to have already been flagged where non sRGB colorspace images loose colour information, yet I have not seen any real solution regarding this/not sure if it applies to my case.

I am wondering if the thumb() function itself would necessitate some colour loss any way, as it would reduce the amount of pixels in the image, or if this is avoidable at all? I have tried removing $command[] = '-strip'; from line 282 from thumb.php within the toolkit, yet this does not change anything.

I am using ImageMagick for my thumb driver. Below are links to two images, the original and thumb, which seems like a pretty drastic difference in colour info…is it possible to mitigate this?





I did a few tests, and it seems to be caused by the stripoption in the IM driver, that strips the embedded color profile. If that solves the problem for you, create a custom driver as a copy of the IM driver with that option removed.

I tried this, just removing $command[] = '-strip'; from the IM driver did nothing for me, I tried deleting the thumbs so they would be regenerated etc. but nothing…

Hm, I tested this with your image in a Kirby Starterkit and it worked as expected. And the imdriver is set in your config.php?

Did you also clear the browser cache after removing the thumbs from the thumbs folder?

1 Like

Ah got it, completely forgot I was also using the Focus plugin, which also required me to remove the -stip from the IM driver within /plugins/focus/drivers/im.php…seems to be working well now, thanks!