Revert "[BUGFIX] Fallback to argument values in f:image/f:media on invalid dimensions"
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Classes / ViewHelpers / MediaViewHelper.php
index 7bdca6c..f967a09 100644 (file)
@@ -116,26 +116,11 @@ class MediaViewHelper extends AbstractTagBasedViewHelper
         );
         $imageService = $this->getImageService();
         $processedImage = $imageService->applyProcessingInstructions($image, $processingInstructions);
-        $tagWidthAttribute = (int)$processedImage->getProperty('width');
-        $tagHeightAttribute = (int)$processedImage->getProperty('height');
-        $trimmedWidthAttribute = (int)trim($width, 'cm');
-        $trimmedHeightAttribute = (int)trim($height, 'cm');
-
-        if ($trimmedWidthAttribute !== $tagWidthAttribute) {
-            $tagWidthAttribute = $trimmedWidthAttribute;
-        }
-        if ($trimmedHeightAttribute !== $tagHeightAttribute) {
-            $tagHeightAttribute = $trimmedHeightAttribute;
-        }
         $imageUri = $imageService->getImageUri($processedImage);
 
         $this->tag->addAttribute('src', $imageUri);
-        if (!empty($tagWidthAttribute)) {
-            $this->tag->addAttribute('width', $tagWidthAttribute);
-        }
-        if (!empty($tagHeightAttribute)) {
-            $this->tag->addAttribute('height', $tagHeightAttribute);
-        }
+        $this->tag->addAttribute('width', $processedImage->getProperty('width'));
+        $this->tag->addAttribute('height', $processedImage->getProperty('height'));
 
         $alt = $image->getProperty('alternative');
         $title = $image->getProperty('title');