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.