Skip to content

Commit

Permalink
Merge pull request #37378 from nextcloud/enh/noid/fix-avatar-generation
Browse files Browse the repository at this point in the history
fix the avatar generation on Alpine Linux
  • Loading branch information
szaimen authored Mar 30, 2023
2 parents 5e7e3eb + 6a91d10 commit 2811532
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 2811532

Please sign in to comment.