MimeTypes icon indicating copy to clipboard operation
MimeTypes copied to clipboard

Add support for jfif files

Open JBac opened this issue 3 years ago β€’ 4 comments

Hi,

Any chance the jfif extension could be added to the typeMap? I believe it just has the mime type of image/jpeg.

Thanks!

JBac avatar May 19 '22 09:05 JBac

Hi @JBac! πŸ‘‹πŸ»

The file is generated from mime-db, which in turn is compiled from IANA, Apache and nginx's MIME types.

If you're able to get the entry into mime-db, maybe in custom-types.json, it'll automatically trickle into this library πŸ˜„

khellang avatar May 20 '22 07:05 khellang

BTW, looks like they've already requested some documentation for jfif; https://github.com/jshttp/mime-db/issues/177.

khellang avatar May 20 '22 07:05 khellang

Still no .jfif "support". I know this list is generated directly from mime-db, which compiles from the three aforementioned sources, and this extension is not registered in any of them, but the JFIF files are handled as "image/jpeg" by all browsers and even in official sources: https://www.w3.org/Graphics/JPEG/

I'm actually adding it manually, but it would be nice to have this already packed in MimeTypes :-) Adding a post-download process to add a few common mime-types if they are missing would be great. Basically that's what I'm currently doing on my code, but I believe most people will have "faith" that this list is mostly inclusive, while, in fact, a somewhat common image format if missing :-(

loudenvier avatar May 21 '23 23:05 loudenvier

Looks like there's a PR for it already; https://github.com/jshttp/mime-db/pull/291 ☺️

khellang avatar May 23 '23 07:05 khellang