From 86e69eaa36dbecca3c6534b61080249f1756aa95 Mon Sep 17 00:00:00 2001 From: Sebastian Helzle Date: Fri, 15 Sep 2023 13:03:39 +0200 Subject: [PATCH] BUGFIX: Allow unsetting thumbnail presets Resolves: #3544 --- Neos.Media/Classes/Domain/Service/ThumbnailGenerator.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Neos.Media/Classes/Domain/Service/ThumbnailGenerator.php b/Neos.Media/Classes/Domain/Service/ThumbnailGenerator.php index bb817fa8a3e..b9ded1f0f43 100644 --- a/Neos.Media/Classes/Domain/Service/ThumbnailGenerator.php +++ b/Neos.Media/Classes/Domain/Service/ThumbnailGenerator.php @@ -48,8 +48,10 @@ public function createThumbnails(AssetInterface $image) { if ($this->autoCreateThumbnailPresets) { foreach ($this->thumbnailService->getPresets() as $preset => $presetConfiguration) { - $thumbnailConfiguration = $this->thumbnailService->getThumbnailConfigurationForPreset($preset, $this->asyncThumbnails); - $this->thumbnailService->getThumbnail($image, $thumbnailConfiguration); + if ($presetConfiguration) { + $thumbnailConfiguration = $this->thumbnailService->getThumbnailConfigurationForPreset($preset, $this->asyncThumbnails); + $this->thumbnailService->getThumbnail($image, $thumbnailConfiguration); + } } } }