tobimori / kirby-blurhash

🎨 Optimized image placeholders with BlurHash for Kirby (3 & 4)
https://getkirby.com/plugins/tobimori/blurhash
MIT License
36 stars 1 forks source link

libpng warning: iCCP: known incorrect sRGB profile #9

Open tasinttttttt opened 11 months ago

tasinttttttt commented 11 months ago

With some png files, there's the uncached error which causes a 500 error:

Whoops \ Exception \ ErrorException (E_WARNING) imagecreatefromstring(): gd-png: libpng warning: iCCP: known incorrect sRGB profile

located in classes/BlurHash.php:55

    // Create a GD image from the file.
55:    $image = imagecreatefromstring($file->thumb($options)->read());
 ...

Maybe has something to do with this.

The quickest fix would be to switch Kirby's config thumb.driver from gd to ImageMagick im.