diff --git a/Neos.Media/Classes/Domain/Service/AssetService.php b/Neos.Media/Classes/Domain/Service/AssetService.php index 0df8f14449c..ae947d94d78 100644 --- a/Neos.Media/Classes/Domain/Service/AssetService.php +++ b/Neos.Media/Classes/Domain/Service/AssetService.php @@ -323,7 +323,9 @@ public function replaceAssetResource(AssetInterface $asset, PersistentResource $ $variant->refresh(); foreach ($variant->getAdjustments() as $adjustment) { if (method_exists($adjustment, 'refit') && $this->imageService->getImageSize($originalAssetResource) !== $this->imageService->getImageSize($resource)) { - $adjustment->refit($asset); + if ($asset instanceof ImageInterface && $asset->getWidth() !== null && $asset->getHeight() !== null) { + $adjustment->refit($asset); + } } } $this->getRepository($variant)->update($variant);