From: Simon L Date: Thu, 23 Mar 2023 22:37:46 +0000 (+0100) Subject: another approach to fixing the avatar generation X-Git-Tag: v26.0.1rc1~34^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=95b3b5dcc2d8f95a28b4f81d2914962cd1cb841c;p=nextcloud-server.git another approach to fixing the avatar generation Signed-off-by: Simon L --- diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php index 9b9220936eb..69bf9bacfcf 100644 --- a/lib/private/Avatar/Avatar.php +++ b/lib/private/Avatar/Avatar.php @@ -129,6 +129,11 @@ abstract class Avatar implements IAvatar { if (!extension_loaded('imagick')) { return null; } + $formats = Imagick::queryFormats(); + // Avatar generation breaks if RSVG format is enabled. Fall back to gd in that case + if (in_array("RSVG", $formats, true)) { + return null; + } try { $font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf'; $svg = $this->getAvatarVector($size, $darkTheme);