Feature summary
My proposal is to add a new Magic word (like {{PAGENAME}}) that would return the type of a file (audio, image, text, video).
The magic word would be eg. {{FILETYPE}}
(I couldn't find anything that matches in the list of magic words)
Use case(s)
The magic word can be used on templates differ behave different for different file types (eg. adding different categories for images and videos)
On Wikimedia Commons there is the template {{File type en}}, but it just decides based on the file extension and not the actual type.
Example: An .ogg file is an audio file no matter what the real file is. File:2026 Rupertikapelle Postelgraben Mittagsglocken 01**.ogg** is a .ogg file, yet it's a video and not an audio file. (Maybe the file extension should be .ogv in this case, but it works so I think it's fair to assume that there are more files like it)
According to Commons:Project scope/Allowable file types "New software supports file extension .ogv for Theora video without or with Vorbis audio, RFC 3534 .ogg is still usable instead of RFC 5334 .ogx for Theora video with other Ogg audio codec". Therefore there is no way to tell by the file extension alone whether the file is an audio or a video file.
Benefits
The return value would be correct regardless of the file extension.
Example: Using {{Taken on}} on a file like 2026 Rupertikapelle Postelgraben Mittagsglocken 01.ogg is not possible as it is auto-categorised as audio file (because of .ogg) even it clearly is a video file.
