⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
TYPO3 Core
All Projects
TYPO3 Core
Overview
Activity
Roadmap
Issues
Repository
Download (1.19 KB)
Bug #83374
ยป diff.txt
My temporary fix -
David Blatter
, 2017-12-18 14:07
diff --git a/typo3/sysext/frontend/Classes/DataProcessing/GalleryProcessor.php b/typo3/sysext/frontend/Classes/DataProcessing/GalleryProcessor.php
index 6ad4c9ef76..6a442a10f1 100644
--- a/typo3/sysext/frontend/Classes/DataProcessing/GalleryProcessor.php
+++ b/typo3/sysext/frontend/Classes/DataProcessing/GalleryProcessor.php
@@ -450,7 +450,11 @@ class GalleryProcessor implements DataProcessorInterface
} else {
$maxMediaWidth = (int)($galleryWidthMinusBorderAndSpacing / $this->galleryData['count']['columns']);
foreach ($this->fileObjects as $key => $fileObject) {
- $mediaWidth = min($maxMediaWidth, $this->getCroppedDimensionalProperty($fileObject, 'width'));
+ $mediaWidth = $maxMediaWidth;
+ $croppedWidth = $this->getCroppedDimensionalProperty($fileObject,'width');
+ if($croppedWidth && $croppedWidth < $mediaWidth) {
+ $mediaWidth = $croppedWidth;
+ }
$mediaHeight = floor(
$this->getCroppedDimensionalProperty($fileObject, 'height') * ($mediaWidth / max($this->getCroppedDimensionalProperty($fileObject, 'width'), 1))
);
(1-1/1)
Loading...