Project

General

Profile

Actions

Feature #93981

open

Google webp and Apple heic/heif support for TYPO3 - Make default targetfileextensions for processed images configurable

Added by Sven Wiener about 3 years ago. Updated about 1 year ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2021-04-24
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
easy
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #93961: Images not converting to webp in image viewhelpersClosedRichard Haeser2021-04-21

Actions
Related to TYPO3 Core - Feature #88537: WebP image format supportClosed2019-06-11

Actions
Actions #1

Updated by Riccardo De Contardi about 3 years ago

  • Related to Bug #93961: Images not converting to webp in image viewhelpers added
Actions #2

Updated by Riccardo De Contardi about 3 years ago

Actions #3

Updated by Martin Kutschker almost 3 years ago

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.

Actions #4

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78260

Actions #5

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78260

Actions

Also available in: Atom PDF