Intervention/image · warning · Intervention\Image\Exceptions\AnalyzerException

No ICC profile found in image

Error message

No ICC profile found in image

What it means

$image->profile() returns the embedded ICC color profile; this AnalyzerException states that the image contains no 'icc' entry in its ImageMagick profile store. The large majority of web images — palette PNGs, screenshots, and JPEGs saved without an embedded profile — carry none, so this is a normal file state to expect rather than a processing defect.

Source

Thrown at src/Drivers/Imagick/Analyzers/ProfileAnalyzer.php:27

use Intervention\Image\Exceptions\AnalyzerException;
use Intervention\Image\Exceptions\StreamException;
use Intervention\Image\Exceptions\InvalidArgumentException;
use Intervention\Image\Interfaces\ImageInterface;
use Intervention\Image\Interfaces\SpecializedInterface;

class ProfileAnalyzer extends GenericProfileAnalyzer implements SpecializedInterface
{
    /**
     * @throws InvalidArgumentException
     * @throws StreamException
     * @throws AnalyzerException
     */
    public function analyze(ImageInterface $image): mixed
    {
        $profiles = $image->core()->native()->getImageProfiles('icc');

        if (!array_key_exists('icc', $profiles)) {
            throw new AnalyzerException('No ICC profile found in image');
        }

        return new Profile($profiles['icc']);
    }
}

View on GitHub (pinned to 5598b9e397)

Solutions

  1. Treat 'no profile' as an expected branch: catch AnalyzerException and fall back to a stock sRGB profile loaded with Profile::fromPath().
  2. When color fidelity matters, attach a known sRGB profile to the image before processing instead of reading one.
  3. For Imagick pipelines, pre-check the profile store via $image->core()->native()->getImageProfiles('icc') to branch without exceptions.

Example fix

// before
$profile = $image->profile(); // throws for profile-less PNGs

// after: fall back to a stock sRGB profile
try {
    $profile = $image->profile();
} catch (\Intervention\Image\Exceptions\AnalyzerException) {
    $profile = \Intervention\Image\Colors\Profile::fromPath('sRGB.icc');
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Imagick driver: check the profile store before calling profile()
$profiles = $image->core()->native()->getImageProfiles('icc');
$profile = array_key_exists('icc', $profiles)
    ? $image->profile()
    : \Intervention\Image\Colors\Profile::fromPath('sRGB.icc');

Try / catch

try { $profile = $image->profile(); } catch (\Intervention\Image\Exceptions\AnalyzerException) { $profile = \Intervention\Image\Colors\Profile::fromPath('sRGB.icc'); }

Prevention

When it happens

Trigger: Calling $image->profile() on PNG/WebP screenshots, files run through metadata-stripping tools or optimized outputs (tinypng-like), or any asset color-managed implicitly (sRGB assumed) instead of via an embedded ICC chunk.

Common situations: Pipelines that copy the ICC profile from an upload to its processed derivative; assuming every JPEG has a profile when many camera files only carry EXIF colorspace hints.

Related errors


AI-assisted analysis of Intervention/image@5598b9e397 (2026-08-23). Data as JSON: /api/errors/3c936a957141d93f. Report an issue: GitHub.