OpenCart Guide · 1 min read · Updated

Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /system/library/image.php on line 45

imagecreatefrompng error

Once we upgrade the PHP to the 8+ version we keep seeing the error like Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /system/library/image.php on line 45.

The fix that we implemented is by suppressing using @. Open system/library/image.php and find imagecreatefrompng($file); and add @ before it.

$this->image = @imagecreatefrompng($file);
imagecreatefrompng
Rupak Nepali
Written byRupak Nepali

Rupak Nepali is a web developer, manage Webocreation website and the author of six books:
Getting Started with OpenCart Module Development (Packt, 2013),
OpenCart Theme and Module Development (Packt, 2015),
OpenCart 4: Dev Guide for Themes & Extensions (2024),
OpenCart 4: User Manual (2025),
Cloudflare for the Enterprise Website (2026) and
The Technical Web Guide for Marketers (2026).
Rupak has built OpenCart stores and extensions since 2010, has published more than 600 tutorials on Webocreation, and shares free OpenCart extensions on GitHub.
Find Rupak on
GitHub | Amazon | LinkedIn | X | YouTube.

Leave a Reply

Your email address will not be published. Required fields are marked *