[BUGFIX] Use ProcessedFile::CONTEXT_IMAGEPREVIEW for inline preview images 03/46003/2
authorGeorg Ringer <georg.ringer@gmail.com>
Sat, 16 Jan 2016 10:47:49 +0000 (11:47 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 16 Jan 2016 12:08:23 +0000 (13:08 +0100)
Using ProcessedFile::CONTEXT_IMAGEPREVIEW respects the ratio and produces
nicer thumbnails.

Change-Id: I8d98dc8ff0a6883c7e03c4dddbdb6d085608904a
Resolves: #71670
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/46003
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php

index bb842a7..10ee65d 100644 (file)
@@ -324,7 +324,7 @@ class InlineRecordContainer extends AbstractContainer
                         $imageSetup['crop'] = $rec['crop'];
                     }
                     $imageSetup = array_merge(array('width' => '45', 'height' => '45c'), $imageSetup);
-                    $processedImage = $fileObject->process(ProcessedFile::CONTEXT_IMAGECROPSCALEMASK, $imageSetup);
+                    $processedImage = $fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, $imageSetup);
                     // Only use a thumbnail if the processing process was successful by checking if image width is set
                     if ($processedImage->getProperty('width')) {
                         $imageUrl = $processedImage->getPublicUrl(true);