Issue Bug Closed

#108859AVIF image tests use wrong target file extension

André Buchmann 02/04/26, 15:23 updated 03/31/26, 08:10

Description

In the TYPO3 Backend → Environment → Image Processing tests, AVIF images are written with an incorrect target file extension.

When converting images to AVIF (e.g. PNG → AVIF), the generated target file still uses a .png (or .jpg) extension instead of .avif.
Example from the Image Processing modal (TYPO3 v14):

'/usr/bin/convert' ... 
'png:/var/www/html/typo3/sysext/install/Resources/Public/Images/TestInput/Transparent.png[0]' 
'/var/www/html/typo3temp/assets/images/installTool-read-avif6983572596240315347629.png'

The target file should have an .avif extension.
For comparison: WebP and other formats use the correct target extensions.

In TYPO3 v13, AVIF tests output .jpg, which results in a black background instead of preserved transparency.

This affects multiple AVIF-related tests in the Environment module.

Expected behavior:

AVIF conversions should consistently generate files with the .avif extension, matching the actual output format and preserving transparency where applicable.

Reviews 3

Files 3

History 918

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-02-04T15:59:27+00:00" > 02/04/26, 15:59 </span>

    I believe a png fallback is in place when avif cannot be used.

    Only either imagick or gmagick does not support writing avif.

    Please can you give details abour your used conversion setup and exact used versions.

  2. André Buchmann commented and changed attached clipboard-202602050928-pmhji.png attached clipboard-202602050928-j7drh.png <span data-processor="relativetime" data-value="2026-02-05T08:30:17+00:00" > 02/05/26, 08:30 </span>

    You’re right about the write issue. The new ddev 1.25.0 comes now with ImageMagick 7.1.1-43, but it can only read avif.
    I didn’t know about the TYPO3 fallback to png/jpg in this case.

    See the PR here: https://github.com/ddev/ddev/pull/8104

    > How This PR Solves The Issue
    > rw+ in v1.24.8 (bookworm):
    >
    >
    
    $ docker run --rm -it ddev/ddev-webserver:v1.24.8 bash -c 'convert -list format | grep -i avif'
    AVIF* HEIC      rw+   AV1 Image File Format (1.15.1)
    

    >
    > r-- in v1.25.0 (trixie):
    >
    >
    
    $ docker run --rm -it ddev/ddev-webserver:v1.25.0 bash -c 'convert -list format | grep -i avif'
    AVIF  HEIC      r--   AV1 Image File Format (1.19.8)
    

    >
    > Install one of the libheif-plugin-* packages:
    >
    > rw+ here:
    >
    >
    
    $ docker run --rm -it ddev/ddev-webserver:v1.25.0 bash -c 'sudo apt-get update &>/dev/null && sudo apt-get install libheif-plugin-aomenc -y &>/dev/null && convert -list format | grep -i avif'
    AVIF  HEIC      rw+   AV1 Image File Format (1.19.8)
    

    Fixed

    When I run sudo apt-get update &>/dev/null && sudo apt-get install libheif-plugin-aomenc -y &>/dev/null in my 14.1.x-dev ddev instance, the file ending is now .avif instead of .png.

    —-

    Seems like there are more issues with ImageMagick in the new ddev 1.25.0 version. I’ll report them on their side, y:

    !clipboard-202602050928-pmhji.png!
    clipboard-202602050928-j7drh.png

  3. Garvin Hicking commented <span data-processor="relativetime" data-value="2026-02-05T12:27:34+00:00" > 02/05/26, 12:27 </span>

    Hi André!

    Thanks so much for investigating and posting back here. Those images really look like a lot of differences, that’s bad.

    It could also of course be a “breaking change” in the magick’s and that TYPO3 would need to create the files differently. Which is why I’ll leave this issue open here until you can maybe figure out if we need something on TYPO3’s end for adoption of the created CLI commands.

    Regards,
    Garvin

  4. André Buchmann commented <span data-processor="relativetime" data-value="2026-02-05T14:47:20+00:00" > 02/05/26, 14:47 </span>

    Hey Garvin,

    short update:

    > *stasadev*
    > All failed images have deprecated +matte from ImageMagick 6
    > https://github.com/ImageMagick/ImageMagick/issues/1974
    > So it’s TYPO3 problem to find the right commands for ImageMagick 7

    Source: https://discord.com/channels/664580571770388500/1468621986220605552/1468936799811407973

    —-

    So we need to implement changes for the newer ImageMagick 7 for TYPO3 14, 13 and hopefully 12 :-)

    And I also don’t like the fallback to png / jpg for avif in the “Image Processing” tests. We should have at least a warning here, that avif cannot be written. Nobody scrolls the commands all to the right to compare the file endings…

    Regards,
    André

  5. Garvin Hicking commented <span data-processor="relativetime" data-value="2026-02-06T22:26:58+00:00" > 02/06/26, 22:26 </span>

    I’ll see where we use “matte” and can try to provide a patch.

    Adjusting the fallback though is harder, as the fallback is done within the generation. We have no “extral way of emitting a waning in that step. We could only render a warning inside the image or as an error log entry, but not within the check (which only says “works / fail”.

    It would be a breaking change to remove it.

    Also with v14 we will have configurable default conversion formats so I consider this to not be needed to change at this point.

  6. Gerrit Code Review pushed patch set 1 for main to change 92741 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2026-02-07T20:54:27+00:00" > 02/07/26, 20:54 </span>

  7. André Buchmann commented and changed attached clipboard-202602072156-qtfeo.png <span data-processor="relativetime" data-value="2026-02-07T21:00:11+00:00" > 02/07/26, 21:00 </span>

    Heyho @ghi
    I’ve implemented a simple compare of the outputted and expected file formats in my patch. The fallback logic itself is fine to have. Just the additional error in the Install Tool can be helpful to solve it and it doesn’t break anything.

    It’s not specific to AVIF :-)
    clipboard-202602072156-qtfeo.png

  8. Garvin Hicking commented <span data-processor="relativetime" data-value="2026-02-08T07:53:58+00:00" > 02/08/26, 07:53 </span>

    Ah, I misunderstood.

    Thanks for the patch, I’ll check it out

  9. André Buchmann commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-02-11T20:25:08+00:00" > 02/11/26, 20:25 </span>

    Applied in changeset commit:ff6952354197068345d7c07b876efab69999df96.