Most AVIF images cannot be displayed by Gallery, but some can.
- /e/OS version: 3.7.1-a15-20260414608755-official-FP6
- Device model(s): Fairphone 6
- Impacted Application: Gallery
## The problem
AVIF images made on my PC, either by GIMP (Windows), or with the reference encoder ([avifenc 1.4.1](https://github.com/AOMediaCodec/libavif), Windows), or with ImageMagick (Linux), cannot be displayed by the Gallery app. A black screen is shown. Some [old AVIF test images](https://github.com/link-u/avif-sample-images) can be shown however.
## Expected behaviour
All images should be shown.
## Current behaviour
A black screen is shown, except for some old AVIFs.
## More context
All the images can be shown without problems by:
* Firefox Focus on /e/OS (if I upload them to a web server)
* Safari on iOS
* IrfanView on Windows
* GIMP on Windows
* Firefox on Windows
* Edge on Windows
* Gwenview on Linux
So it is clear there is nothing wrong with the images. They do not use any fancy features of AVIF, such as layers or grid encoding.
Interestingly, the much older AVIF test images from [here](https://github.com/link-u/avif-sample-images) can be shown by Gallery. (I tested with the fox images). The Gallery shows thumbnails of these images, and if I tap on them, they are shown. There is one AVIF I made a while ago, which can also be shown. Unfortunately, I cannot share this personal photo here. I cannot currently recreate in any way an AVIF which can be shown by /e/OS. Every image I make is only shown as black. I have tried many converters, YUV444 and YUV420, 8bit and 10bit, with AdobeRGB color profile and without color profile. They are all shown as black on /e/OS, but work everywhere else.
Is it possible the AVIF decoder of /e/OS is broken or outdated? Would a simple update of libavif or libheif fix the issue?
For example, in recent builds of avifenc, tune=iq (=image quality) has become the default encoder setting. Is this a problem for /e/OS?
Furthermore, when receiving an AVIF email attachment (this is how I found out), the file icon shows a question mark. On other image formats, the file icon shows as a mountain with sun, the typical image icon. Why does /e/OS not recognize an AVIF file as an image file? It's funny though, as a TIFF email attachment can also not be opened by the /e/OS Gallery, even though it is detected as image with the corresponding icon. Could it be AVIF is not detected as image and therefore not decoded by the Gallery app? The personal AVIF photo which could be decoded, was also shown with question mark though.
Please make the Gallery accept all common image formats, such as: BMP, JPG, GIF, PNG, TIFF, AVIF, WEBP and if possible also HEIF. This is basic functionality of any phone or computer. All of these formats can be regularly encountered on the internet, and browser support has been ubiquitous for years. If that is not possible, then please at least allow the 'Open with' menu in the Files app to open these images with the default web browser, which can decode all of these without problems.
Test images made by different encoders with various settings are included. None of them can be opened by Gallery.
I found two older bug reports, but without any response: #8435 and #7379 . As shown by the attached files, 4:2:0 AVIFs mentioned in #7379 can also not be opened currently.
[wine-adobergb-avifenc-8bit-420.avif](/uploads/4039ccafc52c1409029e7263033b1011/wine-adobergb-avifenc-8bit-420.avif)
[wine-adobergb-avifenc-10bit-444.avif](/uploads/5c8e2202dad9ec8a89b22cf7d215420f/wine-adobergb-avifenc-10bit-444.avif)
[wine-adobergb-gimp-420.avif](/uploads/f0ab91a62db147757b6a7ddb924d84e7/wine-adobergb-gimp-420.avif)
[wine-adobergb-gimp-444.avif](/uploads/b11330ad2719b696a70c3ceb5cacaf29/wine-adobergb-gimp-444.avif)
[wine-adobergb-imagemagick.avif](/uploads/b27b23751af1747e8bce46ac3b80e93c/wine-adobergb-imagemagick.avif)
[wine-adobergb-imagemagick-small.avif](/uploads/2a68062631c088564e37bc37b0bdd6df/wine-adobergb-imagemagick-small.avif)
[wine-srgb-avifenc-8bit-420.avif](/uploads/c0e81123580585c43bf1dd7e68c9363a/wine-srgb-avifenc-8bit-420.avif)
[wine-srgb-avifenc-10bit-444.avif](/uploads/57aa88a70df536b48e6c1ca8eb584ba4/wine-srgb-avifenc-10bit-444.avif)
[wine-srgb-gimp-420.avif](/uploads/33a53e6b8005db702ff54de79937104c/wine-srgb-gimp-420.avif)
[wine-srgb-gimp-444.avif](/uploads/84c730a76f3ab90b7e248d43b20b1f91/wine-srgb-gimp-444.avif)
[wine-srgb-imagemagick.avif](/uploads/612571d826d2583ef2c233f36eb6023e/wine-srgb-imagemagick.avif)
[wine-srgb-imagemagick-small.avif](/uploads/d29b4d832fad2fceddcc5e5fb7246d7b/wine-srgb-imagemagick-small.avif)
<!--Add the labels corresponding to your issue by adding a tilde and typing the name of the label you think apply to your issue in the line above. You need to type a tilde before the name of each label you want to apply to the issue.-->
issue