[BUGFIX] Enable thumbnail generation for IRRE image files with capitalized file... 66/53466/2
authorJohannes Schlier <johannes.schlier@b13.de>
Mon, 10 Jul 2017 11:21:46 +0000 (13:21 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 13 Jul 2017 18:58:22 +0000 (20:58 +0200)
The 'imagefile_ext' list only contains the lowercase versions of all supported extensions.
This patch makes sure that a lowercase version of the file extension is used and it is
recognised as an image file.

Resolves: #81826
Releases: master, 8.7
Change-Id: Ice5881be4c685432987530dcdd50b1f758d883ef
Reviewed-on: https://review.typo3.org/53466
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php

index 47d111f..71899c8 100644 (file)
@@ -342,7 +342,7 @@ class InlineRecordContainer extends AbstractContainer
                     $imageSetup = array_merge(['width' => '45', 'height' => '45c'], $imageSetup);
 
                     if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails']
-                        && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getProperty('extension'))) {
+                        && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getExtension())) {
                         $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')) {