Skip to content

Commit e4cefbe

Browse files
committed
another approach to fixing the avatar generation
Signed-off-by: Simon L <szaimen@e.mail.de>
1 parent 553b5a5 commit e4cefbe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/private/Avatar/Avatar.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ protected function generateAvatarFromSvg(int $size, bool $darkTheme): ?string {
129129
if (!extension_loaded('imagick')) {
130130
return null;
131131
}
132+
$v = Imagick::getVersion()['versionNumber'];
133+
// 1808 is ImageMagick 7.1.0-50
134+
if ($v >= 1808) {
135+
// Skip Avatar generation via ImageMagick as it seems to be broken with that version. Fall-back to php-gd in that case
136+
return null;
137+
}
132138
try {
133139
$font = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
134140
$svg = $this->getAvatarVector($size, $darkTheme);

0 commit comments

Comments
 (0)