From 66c1eff79f066cef00db6fd0a6a85381d7d079a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Sat, 1 Apr 2023 18:43:57 +0200 Subject: [PATCH] Generate WebP thumbnails even for builtin footprints --- config/packages/liip_imagine.yaml | 2 +- src/Services/Attachments/AttachmentURLGenerator.php | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/config/packages/liip_imagine.yaml b/config/packages/liip_imagine.yaml index 041293dd..18cba87c 100644 --- a/config/packages/liip_imagine.yaml +++ b/config/packages/liip_imagine.yaml @@ -16,7 +16,7 @@ liip_imagine: thumbnail_md: - quality: 80 + quality: 90 filters: thumbnail: size: [250, 250] diff --git a/src/Services/Attachments/AttachmentURLGenerator.php b/src/Services/Attachments/AttachmentURLGenerator.php index ced614d9..1aa37904 100644 --- a/src/Services/Attachments/AttachmentURLGenerator.php +++ b/src/Services/Attachments/AttachmentURLGenerator.php @@ -149,11 +149,8 @@ class AttachmentURLGenerator return $this->urlGenerator->generate('attachment_view', ['id' => $attachment->getID()]); } - //For builtin resources 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()) - //GD can not work with SVG, so serve it directly... - || 'svg' === $attachment->getExtension()) { + //GD can not work with SVG, so serve it directly... + if ('svg' === $attachment->getExtension()) { return $this->assets->getUrl($asset_path); }