coollabsio/coolify · error · RuntimeException
ImageMagick or GD is required to process profile pictures th
Error message
ImageMagick or GD is required to process profile pictures that were not compressed by the browser.
What it means
Error "ImageMagick or GD is required to process profile pictures that were not compressed by the browser." thrown in coollabsio/coolify.
Source
Thrown at app/Services/AvatarStorageService.php:109
if (extension_loaded('imagick')) {
$image = new \Imagick($upload->getRealPath());
$image->setIteratorIndex(0);
$image->autoOrient();
$image->cropThumbnailImage(256, 256);
$image->stripImage();
$image->setImageBackgroundColor('white');
$image = $image->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
$image->setImageFormat('jpeg');
$image->setImageCompressionQuality(80);
$contents = $image->getImagesBlob();
$image->clear();
return $contents;
}
if (! function_exists('imagecreatefromstring') || ! function_exists('imagejpeg')) {
throw new RuntimeException('ImageMagick or GD is required to process profile pictures that were not compressed by the browser.');
}
$source = imagecreatefromstring(file_get_contents($upload->getRealPath()));
if (! $source) {
throw new RuntimeException('Unable to read the uploaded profile picture.');
}
$sourceWidth = imagesx($source);
$sourceHeight = imagesy($source);
$cropSize = min($sourceWidth, $sourceHeight);
$target = imagecreatetruecolor(256, 256);
imagefill($target, 0, 0, imagecolorallocate($target, 255, 255, 255));
imagecopyresampled(
$target,
$source,
0,
0,
(int) (($sourceWidth - $cropSize) / 2),View on GitHub (pinned to 70b9acc424)
When it happens
Trigger: Thrown at app/Services/AvatarStorageService.php:109 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17).
Data as JSON: /api/errors/d719386cf5fd471c.
Report an issue: GitHub.