AVIF image: strange behaviour in Panel

When i convert a JPG image to AVIF and upload it in the Panel, the dimensions are unknown. When i click on the thumbnail, the image is not rendered. Instead: i get to see text.

Is this behaviour normal? The JPG and WEBP versions of the same image work as expected.

I’ve tested this with a fresh plainkit 3.9.6.1 install. PHP: 8.2.0.

The reason why the dimensions are not shown is because of the function Kirby\Image\Image->dimensions()` (array of image mime types with dimensions).

As regards the image display, try adding the file type in your htaccess.

AddType image/avif .avif

(Then clear browser cache)

Thank you! The image is now displayed correctly.

I’ve added it like this in the .htaccess file:

<IfModule mod_mime.c>
# AVIF Images
AddType image/avif .avif
</IfModule>

Can i add support for AVIF in this fuction? Or isn’t this supported by Kirby?