.heic MIME type
HEIC imageimages
image/heicThe default photo format on iPhones. Few browsers outside Safari display it.
| MIME type | image/heic |
|---|---|
| Extensions | .heic, .heif |
| Also seen as | image/heif |
| Content-Type | image/heic |
| Compress in transit? | No — already compressed |
| File signature | 66 74 79 70 (ftyp) at offset 4 an ISO base media file; the brand after ftyp is typically heic |
Good to know
- Uploads from iOS may arrive as HEIC; convert server-side to JPEG or WebP before displaying them.
- iOS converts HEIC to JPEG automatically for many web uploads, but not all.
Serve .heic files with the right type
The response header to send:
Content-Type: image/heic
Most servers pick the type from the file extension. If yours sends the wrong one, map it explicitly:
image/heic heic heif;
AddType image/heic .heic .heif
res.set("Content-Type", "image/heic");import mimetypes
mimetypes.add_type("image/heic", ".heic")
mimetypes.add_type("image/heic", ".heif")<input type="file" accept=".heic,.heif,image/heic">
Check it
See what a server sends for a file, and what type a local file really is by its contents:
curl -sI https://example.com/file.heic | grep -i '^content-type:' file --mime-type file.heic
Frequently asked questions
What is the MIME type for .heic files?
image/heic. You may also see image/heif, but image/heic is the one to send. The same type covers .heif.
What Content-Type header should a .heic file be served with?
Content-Type: image/heic. It's already compressed, so servers shouldn't gzip it.
How can I tell if a file is really a .heic?
Check its bytes rather than the extension: HEIC files contain 66 74 79 70 (ftyp) at byte offset 4 — an ISO base media file; the brand after ftyp is typically heic. On the command line, file --mime-type name.heic does this for you.
Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options