devkult_
tools29converters34
home/mime/.heic

.heic MIME type

HEIC imageimages

image/heic

The default photo format on iPhones. Few browsers outside Safari display it.

MIME typeimage/heic
Extensions.heic, .heif
Also seen asimage/heif
Content-Typeimage/heic
Compress in transit?No — already compressed
File signature66 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:

nginx (inside the types block in mime.types)
image/heic heic heif;
Apache (.htaccess or server config)
AddType image/heic .heic .heif
Express
res.set("Content-Type", "image/heic");
Python
import mimetypes

mimetypes.add_type("image/heic", ".heic")
mimetypes.add_type("image/heic", ".heif")
HTML file input
<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.

Related types

Headers that go with it: Content-Type · Content-Disposition · X-Content-Type-Options