Intervention/image · error · ModifierException

Failed to apply Intervention\Image\Drivers\Imagick\Modifiers

Error message

Failed to apply Intervention\Image\Drivers\Imagick\Modifiers\CoverModifier, unable to resize image

What it means

Error "Failed to apply Intervention\Image\Drivers\Imagick\Modifiers\CoverModifier, unable to resize image" thrown in Intervention/image.

Source

Thrown at src/Drivers/Imagick/Modifiers/CoverModifier.php:41

        $resize = $this->resizeSize($crop);

        foreach ($image as $frame) {
            try {
                $frame->native()->cropImage(
                    $crop->width(),
                    $crop->height(),
                    $crop->pivot()->x(),
                    $crop->pivot()->y(),
                );

                $frame->native()->scaleImage(
                    $resize->width(),
                    $resize->height(),
                );

                $frame->native()->setImagePage(0, 0, 0, 0);
            } catch (ImagickException $e) {
                throw new ModifierException(
                    'Failed to apply ' . self::class . ', unable to resize image',
                    previous: $e,
                );
            }
        }

        return $image;
    }
}

View on GitHub (pinned to 5598b9e397)

Solutions

  1. Pass width and height values of at least 1 when calling cover() or coverDown()
  2. Check the source image was decoded correctly and has non-zero dimensions
  3. Increase the PHP memory limit if the target size is very large, since Imagick allocates the resized canvas in memory

When it happens

Trigger: Thrown at src/Drivers/Imagick/Modifiers/CoverModifier.php:41 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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