Fix PR 14591 - improve blurhash creation

This commit is contained in:
Michael 2024-12-09 21:24:28 +00:00
parent 9a8554e40a
commit 17c335238f
6 changed files with 20 additions and 19 deletions

View file

@ -130,12 +130,12 @@ class Link
if (Images::isSupportedMimeType($fields['mimetype'])) {
$img_str = $curlResult->getBodyString();
$image = new Image($img_str, $fields['mimetype'], $url);
$image = new Image($img_str, $fields['mimetype'], $url, false);
if ($image->isValid()) {
$fields['mimetype'] = $image->getType();
$fields['width'] = $image->getWidth();
$fields['height'] = $image->getHeight();
$fields['blurhash'] = $image->getBlurHash();
$fields['blurhash'] = $image->getBlurHash($img_str);
}
}