Keeping color-profile when using resize()


Is there any option to keep the right color-profile when using resize() on an image? I did not find any documentation about this in the docs.

Now, when I resize any image, the color of the generated thumbnail does not match the original file.


Which driver are you using? GD library or ImageMagick? The IM driver strips the color profile and you can prevent that with a custom driver.

Nothing changed in the configuration, so I guess Iā€™m using the GD library (based on the information on this page).

Is creating a custom driver the only option or is there some setting available in the Kirby config.php?

I think the driver is your only option (as you can see in the code I linked to above, the -strip option is not added conditionally), the only configurable options are width, height, grayscales, blur and crop.

You can find an example of registering a custom thumb driver here:

Thanks! I will give it a try.

Did you find a (reusable) solution? :relieved:

This is a common problem when working on websites with color sensitive images (e. g. photography portfolios). Photographers rarely use sRGB, but AdobeRGB or other color profiles for their images.

How do others deal with it? Making the sRGB profile a necessity when uploading images?


I still need to look into this. If I have a solution, I will post it!

1 Like

Hey @jorisvdz , would also be curious about your solution. Currently working on a photographers website :slight_smile:

Unfortunately I never found a working solution.