jshttp / mime-db

Media Type Database
MIT License
1.09k stars 256 forks source link

Add jpe,jif,jfif as image/jpeg mime type #291

Open ianchanning opened 1 year ago

ianchanning commented 1 year ago

jfif is the only one that I have actual files for, but for completeness based on https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types#jpeg_joint_photographic_experts_group_image I included jpe and jif.

Fix for #283

dougwilson commented 1 year ago

Sorry, did not mean to close the PR.

DeniKungurov commented 1 year ago

please tell me what is the status of the task?

mramosbhz commented 1 year ago

So, what do we need to do to add JFIF as an acceptable extension for image/jpeg?

ianchanning commented 1 year ago

So, what do we need to do to add JFIF as an acceptable extension for image/jpeg?

Something from IANA, Apache or NGINX that specifies JFIF as a mimetype. It seems that nothing from either JPEG group themselves or IANA specify it. If you need to have jfif specified as a mimetype you will have to look for other libraries that do things like sniffing the binary contents of the files.

ianchanning commented 1 year ago

... or request a new mime type: https://www.iana.org/form/media-types - I don't know the answers to all their questions.

mramosbhz commented 1 year ago

So, what do we need to do to add JFIF as an acceptable extension for image/jpeg?

Something from IANA, Apache or NGINX that specifies JFIF as a mimetype. It seems that nothing from either JPEG group themselves or IANA specify it. If you need to have jfif specified as a mimetype you will have to look for other libraries that do things like sniffing the binary contents of the files.

Oh! But JFIF is not a mime type. Is an extension for image/jpeg mime type. 🤷‍♂️ We're using a lib called mime-types (from jshttp too) that try to find the file mime-type based on the file extension. This lib uses mime-db as a resource. So it fails! I think I'll have to wrap the call of the lib to manage only this file extension 😞