From 7a3c340d657894bf72130b7e51e313e3b020f9cf Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 10 Jun 2023 09:33:43 +0300 Subject: [PATCH] Try to fix SVG image failed to render. Thanks to xet7 ! Fixes #4830 --- client/components/cards/attachments.jade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade index 913dcb206..959992997 100644 --- a/client/components/cards/attachments.jade +++ b/client/components/cards/attachments.jade @@ -42,7 +42,9 @@ template(name="attachmentsGalery") .attachment-item a.attachment-thumbnail.swipebox(href="{{link}}" title="{{sanitize name}}") if link - if isImage + if($eq extension 'svg') + img.attachment-thumbnail-img(src="{{link}}" title="{{sanitize name}}" type="image/svg+xml") + else if isImage img.attachment-thumbnail-img(src="{{link}}" title="{{sanitize name}}") else if($eq extension 'mp3') video(width="100%" height="100%" title="{{sanitize name}}" controls="true")