Origin and adoption
HEIC (High Efficiency Image Container) is Apple's name for the still-image format inside the broader HEIF (High Efficiency Image File Format) specification. HEIF was published by the Moving Picture Experts Group (MPEG) in 2015 as a container format for images compressed with HEVC (H.265) — the same video codec used for 4K Blu-ray and most modern streaming video.
Apple adopted HEIC as the default photo format on iPhone in iOS 11 (September 2017). Every iPhone since the iPhone 7 captures photos as HEIC by default. Combined with iCloud Photo Library, this means HEIC is now the most common photo capture format in the world, even though it's almost never used as a web delivery format.
The design priority was specific: cut iPhone photo file sizes roughly in half versus JPEG while supporting modern features (HDR, 10-bit colour, alpha, image sequences for Live Photos).
How HEIC compression works
HEIC files contain images compressed with HEVC (also called H.265). HEVC is a block-based predictive codec, like its predecessor H.264, but with substantially more flexibility:
- Coding Tree Units (CTUs) up to 64×64 pixels, compared to H.264's fixed 16×16 macroblocks.
- 35 intra-prediction modes, compared to H.264's 9.
- Improved transform coding with DCT and DST options.
- Sample Adaptive Offset (SAO) filter that reduces ringing and banding artefacts.
- Improved entropy coding via CABAC.
The combined effect, applied to still images, is roughly 50% smaller files than JPEG at equivalent visual quality — a step-change comparable to what AV1 (and AVIF) achieved later.
Container structure
HEIC files use the ISOBMFF container — the same family as MP4 and AVIF. The container can hold:
- A single primary image (the typical case for a photo).
- Multiple image items (used for Live Photos and burst captures).
- Thumbnail variants.
- Image sequences (Live Photos, animated content).
- Auxiliary images (depth maps, alpha masks).
- Image metadata (EXIF, XMP).
The ISOBMFF structure is what allows HEIC to carry Apple's Live Photos: a still image plus a short video segment plus the audio, all in one file.
Browser support
This is where HEIC's web story stops abruptly.
- Safari (macOS, iOS) — decodes HEIC at the OS level. Whether Safari serves HEIC images natively to web pages depends on the OS version and is inconsistent. In practice, web pages cannot reliably expect HEIC to render in Safari.
- Chrome, Firefox, Edge — no HEIC support. The format will not render.
- Mobile browsers (Android Chrome, Samsung Internet) — no support.
Global web browser support for HEIC is effectively zero. This is the single biggest reason HEIC is widespread as a capture format but rare as a delivery format.
The patent situation contributes: HEVC has a complex licensing landscape with multiple patent pools (MPEG LA, HEVC Advance, Velos Media), and Google explicitly chose AV1 / AVIF for the open web ecosystem to avoid those royalty obligations. As long as HEVC carries patent licensing requirements, browser vendors outside Apple have little incentive to add HEIC support.
Why HEIC matters anyway
Despite the lack of browser support, HEIC is the input format for an enormous fraction of all web image uploads. Every iPhone since 2017 (a substantial share of all smartphones globally) captures HEIC by default. When users upload photos to websites, those uploads frequently arrive as HEIC.
For any service that accepts user-submitted photos — social platforms, ecommerce listings, dating apps, real estate sites, photo printing services — handling HEIC input is essential. The typical pipeline:
- User uploads a
.heicfile. - The server detects the format and converts to JPEG, WebP, or AVIF for storage and delivery.
- The site never serves HEIC directly to browsers.
Without this conversion step, iPhone users see "Image failed to load" errors when their browsers try to render the HEIC they just uploaded.
Conversion to web formats
Tools for HEIC conversion:
libheif— the reference open-source library. Handles HEIC decoding (and HEIF encoding more generally). The basis for most other tools.heif-convert— command-line wrapper around libheif. Standard tool for one-off conversions.ImageMagick— supports HEIC reading on systems with libheif installed.- Sharp (Node.js) — handles HEIC input through libheif bindings since v0.32.
- macOS Preview, Photos — built-in support for export to JPEG or other formats.
# Basic conversion to JPEG
heif-convert input.heic output.jpg
# To PNG (lossless)
heif-convert input.heic output.png
# With specific quality (JPEG output)
heif-convert -q 90 input.heic output.jpg
For server-side pipelines processing many HEIC uploads, Sharp is the most practical choice:
import sharp from "sharp";
await sharp("input.heic")
.rotate() // Apply EXIF orientation
.webp({ quality: 80, effort: 6 })
.toFile("output.webp");
The .rotate() call is important — iPhone photos store orientation in EXIF rather than rotating the actual pixel data, and the encoder needs to apply the rotation explicitly.
HEIC vs the alternatives
The comparison that matters depends on whether you're talking about capture or delivery.
For capture (the camera-to-file step):
| Dimension | HEIC | JPEG | RAW |
|---|---|---|---|
| File size (12 MP photo) | 2–3 MB | 4–6 MB | 25–40 MB |
| HDR support | Native | Limited | Best (depends on camera) |
| 10-bit colour | Yes | No (8-bit) | Yes |
| Editor support | Strong (Apple ecosystem) | Universal | Strong (Adobe ecosystem) |
| Cross-platform sharing | Friction | None | Friction |
For delivery (the file-to-browser step):
| Dimension | HEIC | JPEG | WebP | AVIF |
|---|---|---|---|---|
| Browser support | ❌ | ✅ | ✅ | ✅ |
| Web-friendly file size | ✅ | ⚠️ | ✅ | ✅ |
For delivery, HEIC is simply not viable. Use WebP or AVIF for browser-served content, with JPEG fallback. See WebP format overview.
Modern relevance
HEIC matters for:
- iOS photography workflows — the default capture format on iPhone. Users encounter HEIC files daily without realising it.
- Apple-ecosystem editing — Photos, Final Cut, Affinity, and others handle HEIC natively for editing pipelines.
- High-volume photo storage — the file size savings vs JPEG matter for users with thousands of photos.
- Server-side processing — any pipeline accepting user photo uploads must handle HEIC input.
HEIC does not matter for:
- Web delivery. Browsers won't render it. Convert to WebP, AVIF, or JPEG for serving.
- Cross-platform sharing. Sending HEIC files to non-Apple users typically fails or requires their device to convert on receipt.
- Email attachments. Many email clients don't render HEIC.
- Document embeds. Word, Google Docs, and similar tools usually convert HEIC to JPEG on import.
When to keep HEIC vs convert
Keep HEIC when:
- The file is staying in the Apple ecosystem (iCloud, Photos, Final Cut).
- You're optimising for storage size on Apple devices.
- You need the file's HDR or 10-bit content for editing.
Convert to JPEG, WebP, or AVIF when:
- The file will be uploaded to a website.
- The file will be shared with non-Apple users.
- The file will be embedded in a document or presentation.
- The file will be processed by tooling outside the Apple ecosystem.
For a typical photo conversion pipeline, target WebP at q=80 for an optimal balance of file size, quality, and compatibility. See WebP Compression Settings.
What's coming next
The image format landscape is moving toward AVIF for new web content, partly to avoid HEIC's patent friction. AVIF achieves comparable compression to HEIC with an open, royalty-free codec and has broad browser support that HEIC lacks.
Apple's own support for AVIF arrived in Safari 16 (September 2022). Even within the Apple ecosystem, the trajectory points toward AVIF as the cross-platform modern format and HEIC as the iOS-native capture format. The two formats coexist; they serve different roles.
Further reading
- WebP format overview — the format to use for web delivery
- AVIF Format — the modern open-codec alternative to HEIC
- WebP Optimisation — broader image performance guide
- Lossy vs Lossless Compression — encoding mode selection
- Image SEO Best Practices — SEO considerations for uploaded user photos