diff --git a/typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php b/typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php index b87eb48258affd5466528c46fd12154bcd511203..85f7677f8411bcac3bad73abb0e82bae55916294 100644 --- a/typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/ImageManipulationElement.php @@ -289,11 +289,11 @@ class ImageManipulationElement extends AbstractFormElement protected function processConfiguration(array $config, string &$elementValue, File $file) { $cropVariantCollection = CropVariantCollection::create($elementValue, $config['cropVariants']); - if (empty($config['readOnly'])) { + if (empty($config['readOnly']) && !empty($file->getProperty('width'))) { $cropVariantCollection = $cropVariantCollection->applyRatioRestrictionToSelectedCropArea($file); + $elementValue = (string)$cropVariantCollection; } $config['cropVariants'] = $cropVariantCollection->asArray(); - $elementValue = (string)$cropVariantCollection; $config['allowedExtensions'] = implode(', ', GeneralUtility::trimExplode(',', $config['allowedExtensions'], true)); return $config; }