diff --git a/typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php b/typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php index 415ca2c1ad767b98981ca7750028669410a17c73..095f1ec9a7fc7ef96a5631f84012eb667c28b8de 100644 --- a/typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php +++ b/typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php @@ -340,15 +340,21 @@ class InlineRecordContainer extends AbstractContainer $imageSetup['crop'] = $rec['crop']; } $imageSetup = array_merge(['width' => '45', 'height' => '45c'], $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); - $thumbnail = '<img src="' . $imageUrl . '" ' . - 'width="' . $processedImage->getProperty('width') . '" ' . - 'height="' . $processedImage->getProperty('height') . '" ' . - 'alt="' . htmlspecialchars($altText) . '" ' . - 'title="' . htmlspecialchars($altText) . '">'; + + if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails'] + && GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileObject->getProperty('extension'))) { + $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); + $thumbnail = '<img src="' . $imageUrl . '" ' . + 'width="' . $processedImage->getProperty('width') . '" ' . + 'height="' . $processedImage->getProperty('height') . '" ' . + 'alt="' . htmlspecialchars($altText) . '" ' . + 'title="' . htmlspecialchars($altText) . '">'; + } + } else { + $thumbnail = ''; } } } diff --git a/typo3/sysext/backend/Classes/Utility/BackendUtility.php b/typo3/sysext/backend/Classes/Utility/BackendUtility.php index e153658dbd197ca074977773591bf9c527ef3a26..99e90d87f894dca2c181fdd03493d4fe65f0059a 100644 --- a/typo3/sysext/backend/Classes/Utility/BackendUtility.php +++ b/typo3/sysext/backend/Classes/Utility/BackendUtility.php @@ -1286,7 +1286,7 @@ class BackendUtility // Preview web image or media elements if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails'] && GeneralUtility::inList( - $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] . ',' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'], + $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileReferenceObject->getExtension() ) ) {