From a27a6ea6754224bae474b786e4b2fff29ae7fccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Thu, 21 May 2020 22:09:13 +0200 Subject: [PATCH] Dont try to generate thumbnails for SVG files, as GD does not support them... --- src/Services/Attachments/AttachmentURLGenerator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Services/Attachments/AttachmentURLGenerator.php b/src/Services/Attachments/AttachmentURLGenerator.php index 6f7d15ac..21691e50 100644 --- a/src/Services/Attachments/AttachmentURLGenerator.php +++ b/src/Services/Attachments/AttachmentURLGenerator.php @@ -147,7 +147,9 @@ class AttachmentURLGenerator //For builtin ressources it is not useful to create a thumbnail //because the footprints images are small and highly optimized already. - if ('thumbnail_md' === $filter_name && $attachment->isBuiltIn()) { + if (('thumbnail_md' === $filter_name && $attachment->isBuiltIn()) + //GD can not work with SVG, so serve it directly... + || $attachment->getExtension() === 'svg') { return $this->assets->getUrl($asset_path); }