Review main Merged

82196[FEATURE] Enable webp support in ImageMagick/GraphicsMagick

Benni Mack CR +2 V +2 Normal +238 −11 updated 12/18/23, 10:12

Commit message

TYPO3 now supports generation of webp images by default
if ImageMagick / GraphicsMagick supports this.

A new report in the reports extension detects any
misconfiguration.

webp is an image format that is supported by all modern
browsers (https://caniuse.com/webp), which has a similar
quality to jpeg compression while having a smaller file
size.

By default, webp is now in the list of available
image file extensions to be generated in
$TYPO3_CONF_VARS[GFX][imagefile_ext].

If an admin wants to opt out of webp, they can remove
"webp" from this setting in their settings.php file.

Default quality of webp can be configured via
$TYPO3_CONF_VARS[GFX][webp_quality].

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 7

Review log 911

  1. Benni Mack uploaded patch set 1 12/16/23, 21:40

  2. core-ci voted on patch set 1 V +1 12/16/23, 21:45 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50741

  3. Benni Mack uploaded patch set 2 V +1 12/16/23, 22:11

  4. core-ci voted on patch set 2 V +1 12/16/23, 22:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/50742

  5. Simon Schaufelberger commented on patch set 2 CR +1 V +1 12/16/23, 23:27

    tested GifBuilder and worked!
  6. Guido Schmechel commented on patch set 2 12/18/23, 05:43

    GraphicalFunctions.php:202

    A quick question: The "101" occurs 3 times. Do we have to make a variable out of it? There is currently a bit of inconsistency in the class about how to deal with such values.
  7. Benni Mack commented on patch set 2 12/18/23, 07:38

    GraphicalFunctions.php:202 Reply

    101 is taken from GifBuilder where this matches to https://www.php.net/manual/en/image.constants.php#:~:text=of%20PHP%207.0.10)-,IMG_WEBP_LOSSLESS,-(int) which I do not want to use as it is not related to WEBP. We could use a constant, but I'd rather like to centralize this option in the future around all our GFX settings so we could then use a constant, if that's alright?
  8. Guido Schmechel commented on patch set 2 12/18/23, 08:07

    GraphicalFunctions.php:202 Reply

    Alright, this is fine for me.
  9. Christian Kuhn voted on patch set 2 CR +1 V +1 12/18/23, 10:11

  10. Benni Mack commented on patch set 2 CR +2 V +2 12/18/23, 10:12

    Thank you! Finally.
  11. Benni Mack merged patch set 3 12/18/23, 10:12