Avif is supported by discourse by quite a while.
I have tried avif and it works well generally.
But the conversion of avif files does not work well when the avif file contains a photo in a linear profile (at least with rec2020 lineal profile and a 10 bit per channel file).
When you upload the photo it is displayed correctly, but after the system prepares the miniature previews, the previe of the file in the post is substituted by an image that is too dark.
That is typical of software that does not support lineal profiles.
It seems that the conversion software that generates the previews does not recognize the embeded lineal profile.
When you click in it an see it full screen in the light table you see it correctly (as it is the original uploaded file).
Here is an example:
It seems that it works correctly with webp format.
This is the same photo with embeded rec2020 lineal profile in webp and it displays correctly.
Is it a bug?
Is it some misconfiguration in our site?
Has anyone experimented the same problem?