fix(blurhash): Skip generation the if previews are disabled.

Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
Louis Chemineau 2025-05-27 11:23:28 +02:00
parent bb795239b5
commit 72bdb93b66
No known key found for this signature in database

View file

@ -68,6 +68,11 @@ class GenerateBlurhashMetadata implements IEventListener {
return;
}
// Preview are disabled, so we skip generating the blurhash.
if (!$this->preview->isAvailable($file)) {
return;
}
$preview = $this->preview->getPreview($file, 64, 64, cacheResult: false);
$image = @imagecreatefromstring($preview->getContent());