h2non/filetype.py

Animated AVIFs aren't recognized

druzsan opened this issue · 0 comments

Problem

In my workflow I need to check MIME types of different image files and the only one case that didn't work for me were animated AVIF files. Unfortunately, it works for static files only (e.g.), but not for the animated ones (e.g.)

The same happens when I convert an animation to AVIF format using different online converters.

Snippet

A quite short one (for example files, see links above):

import filetype

filetype.guess("fox.profile0.10bpc.yuv420.avif")
# <filetype.types.image.Avif at 0x7f7ff36fb100>

filetype.guess("2.avif")
# None

Version

1.2.0

OS

  • Ubuntu 20.04.6 LTS
  • Windows 10 21H2