Board Thread:Support Requests - Getting Technical/@comment-45310000-20200418011510/@comment-45310000-20200418181628

Andrewds1021 wrote: The exact same issue I have with it. As you pointed out, this file typing implementation is half-baked. Videos are not required to have a file extension. Assumably newer types that are added are not going to have this restriction. And, as I have discovered, you can create a redirect in the File: namespace to remove the extension.
 * In Favor - Removing the extensions would make it easier to auto-generate file links. I assume this is what got you thinking about it. This is actually an issue I have on the wiki I admin. We can't automate the image placement because we don't know which format it will be uploaded as.
 * Against - Having the extension in the name allows users to quickly identiy the type of file when looking at lists of page names. Is it a video, image, audio file, or something else?

It may just be better served to simply extract the mime type from the object's metadata, and use the first part, i.e. image or video, or whatever.

Forcing that type in the title serves might serve a purpose written for some very ugly code that checks that file extension to see if it is one from a long list of image file types that MediaWiki presently supports, but you would be better served by checking the first half of the mime type.