cancel
Showing results for 
Search instead for 
Did you mean: 

libpng warning: iCCP: known incorrect sRGB profile

SOLVED
Highlighted

libpng warning: iCCP: known incorrect sRGB profile

Hello guys,

 

I'm getting below error message when running "bin/magento catalog:image:resize"

 

libpng warning: iCCP: known incorrect sRGB profile

 

there are 530k catalog images and error occurs after resize 249k images.

How an I fix this issue?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: libpng warning: iCCP: known incorrect sRGB profile

Hello @chathuramk ,

 

Libpng-1.6 is more stringent about checking ICC profiles than previous versions. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image.

 

Some applications treat warnings as errors; if you are using such an application you do have to remove the chunk. You can do that with any of a variety of PNG editors such as ImageMagick's convert in.png out.png.

 

To remove the invalid iCCP chunk from all of the PNG files in a folder (directory), you can use ImageMagick's mogrify *.png, provided that your ImageMagick was built with libpng16 (run convert -list format | grep PNG to be sure of that).

 

If you'd like to find out which files need to be fixed instead of blindly processing all of them, you can run my pngcrush -n -q *.png where the "-n" means don't rewrite the files and "-q" means suppress most of the output except for warnings. Sorry, there's no option yet in pngcrush to suppress everything but the warnings.

 

or 

Run below command 

Use find . -type f -name '*.png' -execute mogrify \{\} \; to recursively modify .png files in current directory. 
 
--
If my answer is useful, please Accept as Solution & give Kudos

View solution in original post

3 REPLIES 3
Highlighted

Re: libpng warning: iCCP: known incorrect sRGB profile

Hello @chathuramk 

 

I have seen the same issue thread on the forum itself, here i am sharing the link for the same - https://community.magento.com/t5/Magento-2-x-Version-Upgrades/after-upgrade-from-2-1-6-to-2-1-7-prod...

 

Kindly check it might helps you for the same

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution
Highlighted

Re: libpng warning: iCCP: known incorrect sRGB profile

Hello @chathuramk ,

 

Libpng-1.6 is more stringent about checking ICC profiles than previous versions. You can ignore the warning. To get rid of it, remove the iCCP chunk from the PNG image.

 

Some applications treat warnings as errors; if you are using such an application you do have to remove the chunk. You can do that with any of a variety of PNG editors such as ImageMagick's convert in.png out.png.

 

To remove the invalid iCCP chunk from all of the PNG files in a folder (directory), you can use ImageMagick's mogrify *.png, provided that your ImageMagick was built with libpng16 (run convert -list format | grep PNG to be sure of that).

 

If you'd like to find out which files need to be fixed instead of blindly processing all of them, you can run my pngcrush -n -q *.png where the "-n" means don't rewrite the files and "-q" means suppress most of the output except for warnings. Sorry, there's no option yet in pngcrush to suppress everything but the warnings.

 

or 

Run below command 

Use find . -type f -name '*.png' -execute mogrify \{\} \; to recursively modify .png files in current directory. 
 
--
If my answer is useful, please Accept as Solution & give Kudos

View solution in original post

Highlighted

Re: libpng warning: iCCP: known incorrect sRGB profile