#93981 Google webp and Apple heic/heif support for TYPO3 - Make default targetfileextensions for processed images configurable
Description
Actually the core defines hardcoded which target file-extensions are mapped, if nothing is defined via configuration-array.
In the function “determineTargetFileExtension” in file “sysext/core/Classes/Resource/Processing/AbstractGraphicalTask.php” it is defined that:
1) jpg, jpeg, png and gif will stay the same
2) uncropped svg will stay svg
3) unprocessable files with disabled option $GLOBALS[‘TYPO3_CONF_VARS’][‘GFX’][‘thumbnails_png’] will be gif
4) all other files will be converted to png
This disables the possibility to render all or specific image types to a default type. This is usally needed, if the use of the new file types heic/heif or webp is needed (suggested for better performance, Google!)
The usage of heic/heif files (Default on Apple Devices) oder webp is still configurable, but must be implemented by an integrator to every element. This could be a fluid template with the image viewhelper and the attribute fileExtension.
New configuration options in $GLOBALS[‘TYPO3_CONF_VARS’][‘GFX’] would make it possible to set the target file type. Optimum would be the possibility to add a mapping for each configured type.
A default example list could be something like that:
jpg -> webp
jpeg -> webp
webp -> webp
heic -> webp
png -> png
gif -> gif
svg -> svg
Maybe a default file extension option if no mapping exists.
There are a couple of other configurations we should have an eye on.
The options
$GLOBALS[‘TYPO3_CONF_VARS’][GFX][gif_compress]
$GLOBALS[‘TYPO3_CONF_VARS’][GFX][jpg_quality]
for example should maybe extended by new features for webp optimiazation
Either the “Image Processing” module in the backend could be extended with heic/heif and webp file format.
Last point. We could rethink to get better performance using the modern image formats in the backend.
Reviews 8
- main 78260[FEATURE] Add configuration for convertable image extensions
- main 91108[WIP][TASK] Extract GraphicalFunctions configuration
- main 94250[!!!][TASK] Remove deprecated GraphicalFunctions->gif_or_jpg()
- main 87582[FEATURE] Configure default image conversion/preview formats
- main 89040[TASK] Add GUI-managed map (keys+values) and list for Configuration
- 13.4 89332[TASK] Add GUI-managed map (keys+values) and list for Configuration
- main 87581[TASK] Add GraphicsMagick / ImageMagick f:image conversion tests
- 13.4 87629[TASK] Add GraphicsMagick / ImageMagick f:image conversion tests
Related issues 5
- Feature #88537WebP image format support
- Bug #93961Images not converting to webp in image viewhelpers
- Task #105858Add tests to verify f:image behavior with ImageMagick / GraphicsMagick
- Task #107822Split off a GraphicalSystemConfiguration service from GraphicalFunctions
- Task #109950Remove deprecated GraphicalFunctions->gif_or_jpg()
History 929
Show 34 earlier messages
-
Riccardo De Contardi changed Related to #93961 <span data-processor="relativetime" data-value="2021-04-24T20:22:48+00:00" > 04/24/21, 20:22 </span>
-
Riccardo De Contardi changed Related to #88537 <span data-processor="relativetime" data-value="2021-04-24T20:23:02+00:00" > 04/24/21, 20:23 </span>
-
Martin Kutschker commented <span data-processor="relativetime" data-value="2021-05-13T18:33:18+00:00" > 05/13/21, 18:33 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 78260 status
NewUnder Review <span data-processor="relativetime" data-value="2023-03-26T12:10:02+00:00" > 03/26/23, 12:10 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 78260 <span data-processor="relativetime" data-value="2023-03-26T19:08:46+00:00" > 03/26/23, 19:08 </span>
-
Benni Mack commented and changed status
Under ReviewNeeds Feedback <span data-processor="relativetime" data-value="2024-12-10T14:21:29+00:00" > 12/10/24, 14:21 </span>webp support was added in v13, I’m not sure if we really should add HEIC/HEIF support as Apple / Safari is still the only one to use due to licensing issues. https://caniuse.com/heif
AVIF support is almost there https://caniuse.com/avif
The only part is missing is to configure explicit targetfileextensions, don’t know if we should do this in general.
-
Garvin Hicking changed Related to #105858 <span data-processor="relativetime" data-value="2024-12-21T11:53:39+00:00" > 12/21/24, 11:53 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 87582 status
Needs FeedbackUnder Review <span data-processor="relativetime" data-value="2025-01-03T20:24:02+00:00" > 01/03/25, 20:24 </span> -
Gerrit Code Review pushed patch set 6 for main to change 87582 <span data-processor="relativetime" data-value="2025-01-05T23:31:58+00:00" > 01/05/25, 23:31 </span>
-
Gerrit Code Review pushed patch set 7 for main to change 87582 <span data-processor="relativetime" data-value="2025-01-06T00:22:06+00:00" > 01/06/25, 00:22 </span>
-
Gerrit Code Review pushed patch set 8 for main to change 87582 <span data-processor="relativetime" data-value="2025-01-06T00:33:27+00:00" > 01/06/25, 00:33 </span>
-
Gerrit Code Review pushed patch set 9 for main to change 87582 <span data-processor="relativetime" data-value="2025-07-07T09:54:21+00:00" > 07/07/25, 09:54 </span>
-
Gerrit Code Review pushed patch set 10 for main to change 87582 <span data-processor="relativetime" data-value="2025-07-07T10:17:08+00:00" > 07/07/25, 10:17 </span>
-
Gerrit Code Review pushed patch set 11 for main to change 87582 <span data-processor="relativetime" data-value="2025-07-07T11:53:52+00:00" > 07/07/25, 11:53 </span>
-
Gerrit Code Review pushed patch set 12 for main to change 87582 <span data-processor="relativetime" data-value="2025-07-08T08:59:10+00:00" > 07/08/25, 08:59 </span>
-
Gerrit Code Review pushed patch set 13 for main to change 87582 <span data-processor="relativetime" data-value="2025-07-26T19:28:04+00:00" > 07/26/25, 19:28 </span>
-
Gerrit Code Review pushed patch set 14 for main to change 87582 <span data-processor="relativetime" data-value="2025-09-01T15:16:21+00:00" > 09/01/25, 15:16 </span>
-
Gerrit Code Review pushed patch set 15 for main to change 87582 <span data-processor="relativetime" data-value="2025-09-01T15:19:23+00:00" > 09/01/25, 15:19 </span>
-
Gerrit Code Review pushed patch set 16 for main to change 87582 <span data-processor="relativetime" data-value="2025-09-01T15:21:11+00:00" > 09/01/25, 15:21 </span>
-
Gerrit Code Review pushed patch set 17 for main to change 87582 <span data-processor="relativetime" data-value="2025-09-01T15:22:24+00:00" > 09/01/25, 15:22 </span>
-
Gerrit Code Review pushed patch set 18 for main to change 87582 <span data-processor="relativetime" data-value="2025-09-26T06:44:30+00:00" > 09/26/25, 06:44 </span>
-
Gerrit Code Review pushed patch set 19 for main to change 87582 <span data-processor="relativetime" data-value="2025-10-10T13:01:56+00:00" > 10/10/25, 13:01 </span>
-
Gerrit Code Review pushed patch set 20 for main to change 87582 <span data-processor="relativetime" data-value="2025-10-16T19:16:10+00:00" > 10/16/25, 19:16 </span>
-
Gerrit Code Review pushed patch set 21 for main to change 87582 <span data-processor="relativetime" data-value="2025-10-16T19:35:50+00:00" > 10/16/25, 19:35 </span>
-
Gerrit Code Review pushed patch set 22 for main to change 87582 <span data-processor="relativetime" data-value="2025-10-16T19:36:29+00:00" > 10/16/25, 19:36 </span>
-
Garvin Hicking commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2025-10-20T19:00:09+00:00" > 10/20/25, 19:00 </span>Applied in changeset commit:649ea85171c232cb17df3b4914f0d78cdc49e40b.
-
Garvin Hicking changed Related to #107822 <span data-processor="relativetime" data-value="2025-10-23T21:14:58+00:00" > 10/23/25, 21:14 </span>
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:33:52+00:00" > 12/02/25, 14:33 </span> -
Christian Kuhn changed Related to #109950 <span data-processor="relativetime" data-value="2026-06-01T22:58:39+00:00" > 06/01/26, 22:58 </span>
No WebP support on macOS 10. I have no idea if that system is supported for the upcoming v11.
Another contender is the AVIF format which has no macOS/iOS support (with FF support in the near future).
OTOH HEIC/HEIF is currently support by no browser.
Sidenote:
Not every WebP file is smaller than its JPEG counterpart. The TYPO3 extension “webp” makes sure that WebP is only used if it smaller.