From 95b3b5dcc2d8f95a28b4f81d2914962cd1cb841c Mon Sep 17 00:00:00 2001 From: Simon L Date: Thu, 23 Mar 2023 23:37:46 +0100 Subject: [PATCH] another approach to fixing the avatar generation Signed-off-by: Simon L --- lib/private/Avatar/Avatar.php | 5 +++++ 1 file changed, 5 insertions(+) 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); -- 2.39.5