Skip to content

Commit

Permalink
another approach to fixing the avatar generation
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Mar 29, 2023
1 parent 553b5a5 commit 6a91d10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/private/Avatar/Avatar.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ protected function generateAvatarFromSvg(int $size, bool $darkTheme): ?string {
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);
Expand Down

0 comments on commit 6a91d10

Please sign in to comment.