# .heic MIME Type: image/heic

> The 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 header: `image/heic`
- Compress in transit: no (already compressed)
- File signature: `66 74 79 70` 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.

## Server configuration

### 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">
```

## FAQ

### 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

- [.jpg — image/jpeg](https://www.devkult.com/mime/jpg.md)
- [.avif — image/avif](https://www.devkult.com/mime/avif.md)
- [.webp — image/webp](https://www.devkult.com/mime/webp.md)

Open the interactive page: https://www.devkult.com/mime/heic