{"record":{"id":"b0957f07a2def0de","repo":"Intervention/image","slug":"failed-to-apply-intervention-image-drivers-imagick-b0957f","errorCode":null,"errorMessage":"Failed to apply Intervention\\Image\\Drivers\\Imagick\\Modifiers\\CoverModifier, unable to resize image","messagePattern":"Failed to apply Intervention\\\\Image\\\\Drivers\\\\Imagick\\\\Modifiers\\\\CoverModifier, unable to resize image","errorType":"exception","errorClass":"ModifierException","httpStatus":null,"severity":"error","filePath":"src/Drivers/Imagick/Modifiers/CoverModifier.php","lineNumber":41,"sourceCode":"        $resize = $this->resizeSize($crop);\n\n        foreach ($image as $frame) {\n            try {\n                $frame->native()->cropImage(\n                    $crop->width(),\n                    $crop->height(),\n                    $crop->pivot()->x(),\n                    $crop->pivot()->y(),\n                );\n\n                $frame->native()->scaleImage(\n                    $resize->width(),\n                    $resize->height(),\n                );\n\n                $frame->native()->setImagePage(0, 0, 0, 0);\n            } catch (ImagickException $e) {\n                throw new ModifierException(\n                    'Failed to apply ' . self::class . ', unable to resize image',\n                    previous: $e,\n                );\n            }\n        }\n\n        return $image;\n    }\n}\n","sourceCodeStart":23,"sourceCodeEnd":51,"githubUrl":"https://github.com/Intervention/image/blob/5598b9e39751c34afc5cdee84abef77f92c26f68/src/Drivers/Imagick/Modifiers/CoverModifier.php#L23-L51","documentation":"Error \"Failed to apply Intervention\\Image\\Drivers\\Imagick\\Modifiers\\CoverModifier, unable to resize image\" thrown in Intervention/image.","triggerScenarios":"Thrown at src/Drivers/Imagick/Modifiers/CoverModifier.php:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass width and height values of at least 1 when calling cover() or coverDown()","Check the source image was decoded correctly and has non-zero dimensions","Increase the PHP memory limit if the target size is very large, since Imagick allocates the resized canvas in memory"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5598b9e39751c34afc5cdee84abef77f92c26f68","analyzedAt":"2026-08-23T02:17:31.068Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}