Commit dff519da authored by Georg Ringer's avatar Georg Ringer Committed by Anja Leichsenring
Browse files

[BUGFIX] Use ProcessedFile::CONTEXT_IMAGEPREVIEW for inline preview images

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/45996

Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 706a8eee
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment