Issue Bug New

#111437Writing avif files in image rendering tests generate files not working on Firefox

Markus Klein 11/13/26, 13:30 updated 11/21/26, 14:47

Description

The generated files work with normal image viewers, chromium-based browsers, but not Firefox.

'/usr/bin/convert' -interlace 'None' -auto-orient -background none '+profile' '*' -auto-orient -geometry 300x225! -sharpen 1x2 -quality 85 -colorspace 'sRGB' 'heif:/var/www/vendor/typo3/cms-install/Resources/Public/Images/TestInput/Test.avif[0]' '/var/www/public/typo3temp/assets/images/installTool-write-avif6af7086fcbbe7411290651.6af7086ff2d5b0.74333909.tmp.avif'
identify /var/www/public/typo3temp/assets/images/installTool-read-avif6af70871a2672871049577.6af70871b49637.69154280.tmp.avif
AVIF 300x225 300x225+0+0 8-bit sRGB 21231B 0.010u 0:00.001
convert --version
Version: ImageMagick 7.1.1-43 Q16 x86_64 22550 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw tiff webp wmf x xml zlib zstd
Compiler: gcc (14.2)
convert -list format | grep -i AVIF
     AVIF  HEIC      rw+   AV1 Image File Format (1.23.6)
heif-info --version
1.23.6
libheif: 1.23.6
plugin path: /usr/lib/x86_64-linux-gnu/libheif/plugins
heif-info  /var/www/public/typo3temp/assets/images/installTool-read-avif6af70871a2672871049577.6af70871b49637.69154280.tmp.avif
MIME type: image/avif
main brand: avif
compatible brands: mif1, avif, miaf

image: 300x225 (id=1), primary
  colorspace: YCbCr, 4:2:0
  bit depth: 8
  color profile: no
  alpha channel: yes 
  depth channel: no
metadata:
  none
transformations:
  crop: left=0 top=0 right=0 bottom=1
region annotations:
  none
text items:
  none
properties:
none
MIME items:

AI not really helpful yet, what the issue might be.
Suspicion is the

transformations:
  crop: left=0 top=0 right=0 bottom=1

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[BUGFIX] Writing avif files in image rendering tests generate files not working on Firefox Resolves: #111437 Releases: main

History 4

  1. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2026-11-20T19:59:44+00:00" > 11/20/26, 19:59 </span>

    (AI support)

    Could not reproduce with libheif 1.19.8

    Thanks for the detailed report!

    I tried to reproduce this with the same command as the Install Tool uses, but the AVIF files render fine in Firefox here.

    Setup
    • Firefox 160 (macOS)
    • ImageMagick with libheif 1.19.8 (DDEV web container)
    • Source: typo3/sysext/install/Resources/Public/Images/TestInput/Test.avif
    • convert -interlace None -auto-orient -background none +profile '*' -geometry 300x<height>! -sharpen 1x2 -quality 85 -colorspace sRGB 'heif:Test.avif[0]' 'avif:out.avif'
    Result
    • Heights 224, 225 and 226 all render correctly in Firefox, including the odd height 225.
    • None of the generated files contains a clap box, so the crop shown by heif-info in your output does not appear with this libheif version.

    So the odd height of 300×225 alone does not seem to be the cause. The difference might be the newer libheif (1.23.6) or the alpha channel reported by heif-info.

    Could you provide:
    • the output of heif-info for a file that does render in Firefox, to compare it with the broken one
    • the generated broken file as attachment
    • whether it still happens with -geometry 300x224! (even height)
  2. Markus Klein commented and changed status Needs Feedback New <span data-processor="relativetime" data-value="2026-11-21T14:16:30+00:00" > 11/21/26, 14:16 </span>

    The test is with a different lib version, so the ticket may still be valid and does not “need feedback” unless it’s not broken for you on the exact same lib version.

    My test was based on the official php:8.5-fpm image.

  3. Markus Klein commented <span data-processor="relativetime" data-value="2026-11-21T14:27:09+00:00" > 11/21/26, 14:27 </span>

    difference in the AI test is the target file: ‘avif:out.avif’
    which has this “avif” prefix.

    will check if that matters

  4. Markus Klein commented <span data-processor="relativetime" data-value="2026-11-21T14:47:16+00:00" > 11/21/26, 14:47 </span>

    The ‘avif:’ part does not make a difference.

    -geometry 300×224! does indeed work.
    -geometry 300×225! does not work.

    Tested with Firefox 161.0b5

    heif-info test225.avif 
    MIME type: image/avif
    main brand: avif
    compatible brands: mif1, avif, miaf
    
    image: 300x225 (id=1), primary
      colorspace: YCbCr, 4:2:0
      bit depth: 8
      color profile: no
      alpha channel: no 
      depth channel: no
    metadata:
      none
    transformations:
      crop: left=0 top=0 right=0 bottom=1
    region annotations:
      none
    text items:
      none
    properties:
    none
    MIME items:
    heif-info test224.avif 
    MIME type: image/avif
    main brand: avif
    compatible brands: mif1, avif, miaf
    
    image: 300x224 (id=1), primary
      colorspace: YCbCr, 4:2:0
      bit depth: 8
      color profile: no
      alpha channel: no 
      depth channel: no
    metadata:
      none
    transformations:
      none
    region annotations:
      none
    text items:
      none
    properties:
    none
    MIME items:

    Image used:

    podman run --rm -it -v ./:/var/www -w /var/www docker.io/library/php:8.5-fpm bash
    apt update && apt install -y --no-install-recommends libavif-dev libheif-dev libheif-examples libheif-plugin-svtenc imagemagick
    '/usr/bin/convert' -interlace 'None' -auto-orient -background none '+profile' '*' -geometry 300x225! -sharpen 1x2 -quality 85 -colorspace 'sRGB' 'heif:Test.avif[0]' test225.avif