Key takeaways:
- HEIF is a container, not a compression method. It holds images encoded by some other codec, and HEVC is the one it uses by default.
- A .heic file is a HEIF file carrying HEVC-encoded images, which is what an iPhone writes. A .heif file may carry any codec the container allows, so a size claim belongs to the encode rather than to the extension.
- Device support is strong and browser support is not. Accept HEIF, store it, and convert it on the way out.
What Is HEIF (High Efficiency Image File Format)?
HEIF is a file format for storing individual images and image sequences in a compact, high-quality manner. It is based on the High Efficiency Video Coding (HEVC) standards and was developed by the Moving Picture Experts Group (MPEG). HEIF has gained significant attention due to its ability to provide superior image compression without compromising on quality, and it is now the default photo format for iPhones.
The primary goal of HEIF is to improve upon the existing image formats, such as JPEG, by offering better compression and more advanced features.
In this article:
- History of HEIF
- How HEIF Works
- HEIF vs HEIC: What Is the Difference?
- Key Advantages of HEIF
- What Supports HEIF: Operating Systems, Browsers, and Editors
- How Do You Open a HEIF File?
- How Do You Convert HEIF to JPEG, WebP, or AVIF?
- 4 Best Practices for Using HEIF
History of HEIF
The roots of HEIF can be traced back to the early 2000s when the development of HEVC began. HEVC was designed to be a more efficient video compression standard than its predecessor, H.264. As the HEVC standard evolved, the potential for a new, more efficient image format based on the same technology became apparent.
In 2013, the MPEG began working on the HEIF format, which was completed in 2015. By using the HEVC compression technology, HEIF was designed to address the limitations of existing image formats, such as the ubiquitous JPEG. The format was officially standardized by the International Organization for Standardization (ISO) in 2015.
The adoption of HEIF started to pick up steam when Apple announced its support for the format in 2017. With the release of iOS 11 in 2017, HEIF (as .heic) became the default image format for iPhones and iPads, replacing the JPEG format that had been in use for decades. This decision by Apple brought HEIF into the mainstream, and its popularity has only grown since then.
Two threads run through that history, and keeping them apart explains most of the confusion around the format. The first is the container, standardized in 2015 as ISO/IEC 23008-12 on top of the ISO base media file format that already underpinned MP4. The second is the codec that fills it: HEVC is the codec the container shipped with, and the set it is permitted to carry has widened since to include AV1, AVC (H.264), VVC, EVC, JPEG and JPEG 2000. Android arrived from the other direction, reading HEIF from Android 8 and capturing HEIC from Android 10.
How HEIF Works
The HEIF format uses the HEVC codec to compress images, which offers significant advantages over the older JPEG format.
HEVC divides an image into small rectangular blocks, called Coding Units (CUs). These CUs are then compressed individually, allowing for greater flexibility and efficiency in the compression process. This technique is particularly effective in reducing file size without sacrificing image quality.
What a HEIF File Actually Contains
The specification defines several kinds of payload that can sit in a single file, which is what makes the format more than a smaller JPEG:
- Image items. Individual images with their properties and their thumbnails. One picture can be stored as a grid of independent tiles, so a decoder can decode only the tiles covering the part of the image on screen.
- Image derivations. Crops, quarter-turn rotations and overlays are held as instructions beside the image data rather than baked into it, so a wrongly recorded camera orientation can be corrected without re-encoding the picture.
- Image sequences. Several time-related images, such as a burst, where prediction between frames exploits their similarity and keeps the file smaller than the same frames stored separately.
- Auxiliary image items. Data that supports an image without being displayed itself, such as an alpha plane or a depth map.
- Image metadata. Exif and XMP carried inside the container, so camera settings and editing history travel with the file.
The compression itself is the codec’s job, which is why the same container can hold a careful HEVC encode, a careless one, or even a JPEG, and why a .heif file is not guaranteed to be efficiently compressed.
HEIF also supports advanced features, such as storing multiple images within a single file, transparency, and image sequences. This makes HEIF a versatile option for various applications, including photography, image sharing, and even virtual reality. Learn more about HEIC file format in our video below.
What a HEIF File Actually Contains
The specification defines several kinds of payload that can sit in a single file, which is what makes the format more than a smaller JPEG:
- Image items. Individual images with their properties and their thumbnails. One picture can be stored as a grid of independent tiles, so a decoder can decode only the tiles covering the part of the image on screen.
- Image derivations. Crops, quarter-turn rotations and overlays are held as instructions beside the image data rather than baked into it, so a wrongly recorded camera orientation can be corrected without re-encoding the picture.
- Image sequences. Several time-related images, such as a burst, where prediction between frames exploits their similarity and keeps the file smaller than the same frames stored separately.
- Auxiliary image items. Data that supports an image without being displayed itself, such as an alpha plane or a depth map.
- Image metadata. Exif and XMP carried inside the container, so camera settings and editing history travel with the file.
The compression itself is the codec’s job, which is why the same container can hold a careful HEVC encode, a careless one, or even a JPEG, and why a .heif file is not guaranteed to be efficiently compressed.
HEIF also supports advanced features, such as storing multiple images within a single file, transparency, and image sequences. This makes HEIF a versatile option for various applications, including photography, image sharing, and even virtual reality. Learn more about HEIC file format in our video below.
HEIF vs HEIC: What Is the Difference?
HEIF is the container standard. HEIC is the name for the common case of that container holding HEVC-encoded images, and the standard reserves the .heic extension for exactly that case, with .heics for sequences.
A file ending in .heic went through HEVC encoding, while a file ending in .heif may carry any codec the container allows, including JPEG. Apple devices only ever write .heic, which is why the two names get used as if they were interchangeable.
| Extension | What is inside | MIME type | Where you meet it |
|---|---|---|---|
| .heic, .heics | HEVC-encoded image or image sequence | image/heic, image/heic-sequence | Photos captured on iPhone and iPad |
| .heif, .heifs | Any codec the container allows | image/heif, image/heif-sequence | The generic case, including files written by desktop tools |
| .hif, .hifs | HEVC-encoded content | Registered alongside HEIF | An alternative extension in the format’s registered set |
| .avci, .avcs | AVC (H.264) encoded image or sequence | image/avci, image/avcs | Rare in practice |
| .avif | AV1, in a HEIF-derived container | image/avif | The member of this family browsers actually display |
Key Advantages of HEIF
There are several reasons why HEIF is emerging as a powerful contender in the world of digital imaging. Here are some of the most notable advantages that set HEIF apart from other image file formats:
- Superior compression: The most significant benefit of HEIF is its ability to compress images more efficiently than JPEG. On average, HEVC-encoded HEIF images, meaning the .heic files phones and cameras produce, are about 50% smaller than their JPEG counterparts at the same visual quality, so you can store roughly twice as many photos in the same space.
- Lossless compression: Unlike JPEG, HEIF supports both lossy and lossless compression. This means that you can choose to compress your images without any loss of quality, which is critical for professional photographers and artists who need the highest possible fidelity in their work.
- Multiple images in a single file: HEIF allows you to store multiple images within a single file. This is particularly useful for creating image sequences, such as burst photos or animations. Additionally, HEIF can store both a high-resolution image and a smaller, lower-resolution version in the same file, making it easier to share and display images on devices with varying screen resolutions.
- Advanced editing features: HEIF supports non-destructive editing, which means that you can make changes to an image without altering the original file. This is possible due to HEIF’s support for storing image data and editing instructions separately. You can also store additional metadata, such as depth information and image orientation, within the HEIF file.
- Compatibility: Although HEIF is a relatively new format, it is now supported by most modern devices and applications, including iOS, macOS, Android, Windows, (where Windows 10 needs the HEIF Image Extension installed first), and Adobe’s Creative Cloud suite (where Photoshop reads the format but cannot save to it), though the open-source AVIF format has become the more common choice for the web. This widespread compatibility makes it easier to adopt HEIF as your preferred image format.
What Supports HEIF: Operating Systems, Browsers, and Editors
Support is strong on devices and patchy everywhere else, and that split is what should govern how you handle these files.
| Platform | What is supported |
|---|---|
| iOS and iPadOS | Read and write HEIC from iOS 11. AVIF from iOS 16 |
| macOS | HEIC from High Sierra and later |
| Windows 10 | HEIC from version 1803 and AVIF from 1903, through the HEIF Image Extension. The HEVC codec is a separate paid extension |
| Windows 11 | The HEIF Image Extension should be included from 22H2, though some users report having to install it manually |
| Android | HEIF from Android 8, HEIC from Android 10, AVIF from Android 12 |
| Linux | HEIC on Ubuntu 20.04 and later, Debian 10.13 and later, Fedora 36 and later |
| Web browsers | No HEIC delivery path to rely on. In this family, the format browsers support is AVIF: Chrome, Edge, Firefox, Opera and Safari |
| Cameras | Canon, Nikon and Sony include HEIF capture in many of their cameras |
Capture format and delivery format are two different decisions, and HEIC is not a delivery format: Facebook accepts a HEIC upload and converts it to JPEG or WebP for display, and Discord does not support HEIC at all. Treat HEIF as a format you accept and convert, not one you serve.
Editor support is uneven in a specific way: reading a HEIF file is far more common than writing one.
| Tool | Reads HEIF | Writes HEIF |
|---|---|---|
| Apple Photos and Preview | Yes, from macOS High Sierra | Yes |
| Adobe Photoshop | Yes, 8-bit HEIC. On Windows it needs Microsoft’s HEIF and HEVC codecs | No |
| Adobe Lightroom | Yes, on macOS 10.13 and later, iOS 11 and later, Windows 10 and later, Android 9 and later | Not documented |
| GIMP | Yes, since version 2.10.2 | Yes, export since 2.10.2 |
| ImageMagick | Yes, in builds that include libheif | Yes, in builds that include libheif |
| Zoner Studio | Yes, since 2025 | Yes, since 2025 |
| ACDSee | Yes, read only | No |
| Corel PHOTO-PAINT | Yes | No |
How Do You Open a HEIF File?
- On an iPhone, iPad or Mac, open it as it is. Photos and Preview handle HEIC from iOS 11 and macOS High Sierra, with nothing to install.
- On Windows 11, double-click it. From 22H2 the HEIF Image Extension should already be present. If the file will not open, install it from the Microsoft Store, and add the HEVC extension when the content is HEVC-encoded.
- On Windows 10, install the extension first. You need version 1803 or later plus the HEIF Image Extension, and the HEVC codec is a separate paid item. CopyTrans HEIC for Windows is an alternative that lets File Explorer and Windows Photo Viewer open the files without it.
- On Linux or Android, check what you are on. HEIC works on Ubuntu 20.04 and later, Debian 10.13 and later and Fedora 36 and later, and GIMP opens and exports HEIF from version 2.10.2. On Android, 8 reads HEIF and 10 adds HEIC.
- If none of that applies, convert the file. A JPEG or PNG copy opens anywhere, and the next section covers doing that for one file or for a whole upload pipeline.
How Do You Convert HEIF to JPEG, WebP, or AVIF?
For a single file, any of the editors above will do: open it and export. For a site or an app that takes photographs from users, the conversion belongs on the server, because you cannot control what a visitor’s phone produces.
- Decide what you are converting to. Serve AVIF or WebP for photographs on the web, and keep JPEG as the fallback for anything that rejects newer formats.
- Keep the original. Convert on delivery rather than on ingest, so the higher bit depth data is still there if you need it later.
- Convert at request time, per browser. Cloudinary lists .heif and .heic as supported for upload and for transformations, so the file off the phone can be stored as it is. Adding f_auto and q_auto then delivers each image in the format the requesting browser handles best. The documentation asks for them as the final two components of the delivery URL, separated by a slash rather than joined with a comma:
https://res.cloudinary.com/<cloud_name>/image/upload/c_fill,w_1200,h_630/
The same thing in code. This uploads a HEIC file straight off a phone and builds a browser-appropriate delivery URL with the version 2 Node SDK:
// npm install cloudinary@2
import { v2 as cloudinary } from 'cloudinary';
cloudinary.config({
cloud_name: process.env.CLOUDINARY_CLOUD_NAME,
api_key: process.env.CLOUDINARY_API_KEY,
api_secret: process.env.CLOUDINARY_API_SECRET,
});
const uploaded = await cloudinary.uploader.upload('./IMG_4821.HEIC', {
public_id: 'photos/beach_photo',
});
const webUrl = cloudinary.url('photos/beach_photo', {
transformation: [
{ crop: 'fill', width: 1200, height: 630 },
{ fetch_format: 'auto' },
{ quality: 'auto' },
],
});
console.log(uploaded.format); // the format detected in the original
console.log(webUrl); // AVIF, WebP or JPEG, chosen per browser
To convert a batch on disk instead, ImageMagick 7 reads HEIF in builds that include libheif. Use the magick command, since the older convert binary is deprecated:
magick IMG_4821.HEIC -quality 85 beach_photo.jpg
# a whole folder
for f in *.HEIC; do magick "f"-quality85"{f%.HEIC}.jpg"; done
There is also the option of not producing HEIC in the first place. On iPhone and iPad, open Settings, tap Camera, tap Formats and choose Most Compatible, and the camera saves JPEG from then on. High Efficiency in the same menu switches back.
4 Best Practices for Using HEIF
Let’s discuss some best practices for using this format in your photography workflow:
- Choose the right compression settings: When working with HEIF, it’s essential to select the appropriate compression settings for your specific use case. If you require lossless compression, make sure to enable this option in your imaging software or camera settings. For most general applications, however, the default lossy compression settings should provide excellent results.
- Use HEIF for image sharing: Due to its superior compression capabilities, HEIF is an ideal format for sharing images online. By using HEIF, you can reduce the file size of your images without sacrificing quality, making it easier for your recipients to download and view your photos.
- Take advantage of HEIF’s advanced features: As mentioned earlier, HEIF supports a variety of advanced features that can enhance your photography workflow. Be sure to explore these capabilities, such as non-destructive editing and storing multiple images in a single file, to get the most out of the HEIF format.
- Stay updated on HEIF support: While HEIF is already widely supported, it’s essential to keep an eye on future developments and updates. As more devices and applications adopt the HEIF format, you’ll want to ensure that your workflow remains compatible and up-to-date.
HEIF with Cloudinary
While the HEIF format offers superior compression and quality features, it does present challenges, including compatibility issues and processing demands. These can make handling HEIF files a complex task for developers. However, there’s good news: solutions like Cloudinary provide a roadmap to navigate the complexities of HEIF.
Cloudinary offers a versatile platform to handle HEIF files. A key feature is its ability to automatically convert HEIF files into any output format on the fly, including web-friendly formats like WebP and AVIF, significantly reducing the compatibility issues inherent in the HEIF format. Plus, with Cloudinary, you have smart automatic quality and encoding settings at your disposal, which ensure the delivery of the best quality-image while optimizing for file size and format.
Additionally, Cloudinary steps up the game by offering powerful, on-the-fly manipulations. Whether it’s resizing, cropping, applying effects, or any other transformations, we make processing HEIF files a breeze. Additionally, through its broad network of CDN partnerships, Cloudinary offers rapid, secure, and reliable content delivery all over the globe.
Deliver HEIF Uploads in a Format Browsers Accept
f_auto picks the delivery format per browser, q_auto sets the quality, and you should use both on every delivery URL. However, note that f_auto won’t convert a HEIC file for a browser. The formats it selects between are the ones browsers decode, including AVIF, JPEG XL, WebP and PNG, and when a browser supports none of them the image is delivered in its original format.
Frequently Asked Questions
Is HEIF the same as HEIC?
They are closely related but not identical. HEIF (High Efficiency Image File Format) is the container standard, while HEIC is the specific version Apple uses, storing HEVC-encoded images in that container. In everyday use, the .heic files your iPhone creates are HEIF files, which is why the two names are often used interchangeably.
Should I use HEIF or JPEG?
For storage and modern devices, HEIF wins: it delivers the same quality as JPEG at roughly half the size and supports extras like depth data and image sequences. For maximum compatibility, especially older systems or the open web, JPEG (or AVIF and WebP) is still safer. A common approach is to shoot in HEIF and convert to a web format automatically at delivery time.
Can browsers display HEIF images?
Not reliably, and it is not something to plan around. The browser support in this family is for AVIF, which puts AV1 inside a HEIF-derived container and which Chrome, Edge, Firefox, Opera and Safari all support. HEIC has no comparable delivery path. Convert to AVIF, WebP or JPEG before serving, which is what f_auto does per request.
Is HEIF lossless?
It can be. The format supports both lossy and lossless compression, depending on the codec and the settings used, which is a difference from JPEG’s lossy-only compression. Phone cameras write lossy HEIC by default, so a file straight off an iPhone is not a lossless original.