Use pngcrush
to remove the incorrect sRGB profile from the png file:
pngcrush -ow -rem allb -reduce file.png
-ow
will overwrite the input file-rem allb
will remove all ancillary chunks except tRNS and gAMA-reduce
does lossless color-type or bit-depth reductionIn the console output you should see Removed the sRGB chunk
, and possibly more messages about chunk removals. You will end up with a smaller, optimized PNG file. As the command will overwrite the original file, make sure to create a backup or use version control.