Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which MIME type should be used for a raw image?

Tags:

mime-types

Raw images are produced by cameras, scanners, etc. and typically give you more post-processing flexibility than JPEG images.

If I’m serving this kind of file from my web server, which media type (a.k.a. MIME type) should I use? I’m specifically interested in the CR2 files produced by recent Canon cameras, but answers could also address Adobe’s Digital Negative (DNG) format or raw files from other manufacturers’ cameras. (I didn’t see anything relevant in this list from the IANA.)

like image 775
bdesham Avatar asked Apr 18 '17 13:04

bdesham


People also ask

What is the MIME type of jpg?

Only image/jpeg is recognised as the actual mime type for JPEG files.


2 Answers

According to this XML file from the (defunct?) GNOME RAW Thumbnailer project, the MIME type for raw images in general is image/x-dcraw. Listed by their file extensions, here are the other file types mentioned in that file:

  • ARW: image/x-sony-arw
  • CR2: image/x-canon-cr2
  • CRW: image/x-canon-crw
  • DCR: image/x-kodak-dcr
  • DNG: image/x-adobe-dng
  • ERF: image/x-epson-erf
  • K25: image/x-kodak-k25
  • KDC: image/x-kodak-kdc
  • MRW: image/x-minolta-mrw
  • NEF: image/x-nikon-nef
  • ORF: image/x-olympus-orf
  • PEF: image/x-pentax-pef
  • RAF: image/x-fuji-raf
  • RAW: image/x-panasonic-raw
  • SR2: image/x-sony-sr2
  • SRF: image/x-sony-srf
  • X3F: image/x-sigma-x3f
like image 193
bdesham Avatar answered Sep 19 '22 17:09

bdesham


It might be too late for the author of the question, but might be helpful for others struggling with the same problem.

For .CR2 it is image/x-dcraw.

For .DNG it is image/x-adobe-dng

like image 42
Volodymyr Buberenko Avatar answered Sep 23 '22 17:09

Volodymyr Buberenko