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-by: Wouter Wolters's avatarWouter Wolters <>
Reviewed-by: default avatarMorton Jonuschat <>
Tested-by: default avatarMorton Jonuschat <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <>
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