[BUGFIX] Also consider JPEG files for IM/GM 15/23815/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 13 Sep 2013 14:37:32 +0000 (16:37 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Fri, 13 Sep 2013 16:46:40 +0000 (18:46 +0200)
The Core does not check for the JPEG file extension
when converting images with IM/GM.

Resolves: #51981
Releases: 6.2, 6.1, 6.0
Change-Id: I148ecb0d3c71fdee563476c33865cd18420b2384
Reviewed-on: https://review.typo3.org/23815
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/core/Classes/Resource/Processing/AbstractGraphicalTask.php

index efe5b19..324eab6 100644 (file)
@@ -100,7 +100,7 @@ abstract class AbstractGraphicalTask extends AbstractTask {
                        // Bit1: Even JPG's will be converted to png or gif (2=gif/3=png)
 
                        $targetFileExtensionConfiguration = $GLOBALS['TYPO3_CONF_VARS']['GFX']['thumbnails_png'];
-                       if ($this->getSourceFile()->getExtension() === 'jpg') {
+                       if ($this->getSourceFile()->getExtension() === 'jpg' || $this->getSourceFile()->getExtension() === 'jpeg') {
                                if ($targetFileExtensionConfiguration == 2) {
                                        $targetFileExtension = 'gif';
                                } elseif ($targetFileExtensionConfiguration == 3) {