Skip to content
Snippets Groups Projects
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: default 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: default avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 706a8eee
No related merge requests found
......@@ -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);
......
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