coollabsio/coolify · error · RuntimeException
Unable to read the uploaded profile picture.
Error message
Unable to read the uploaded profile picture.
What it means
Error "Unable to read the uploaded profile picture." thrown in coollabsio/coolify.
Source
Thrown at app/Services/AvatarStorageService.php:114
$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),
(int) (($sourceHeight - $cropSize) / 2),
256,
256,
$cropSize,
$cropSize,View on GitHub (pinned to 70b9acc424)
When it happens
Trigger: Thrown at app/Services/AvatarStorageService.php:114 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/90cebec6de4eeb97.
Report an issue: GitHub.