HEIF vs. JPEG: Breaking Down Image Quality and File Size

Last Updated: September 26, 2023By
Woman taking picture on iphone

Capturing a moment in a digital photograph is just the first step in a longer journey, one that often involves storing, sharing, and editing that image. Over the years, JPEG has dominated this journey as the most widely used image format.

Yet, with technological advancements, a formidable competitor has emerged: HEIF. Both formats have their merits and limitations, affecting aspects like image quality, file size, and compatibility.

What is JPEG?

JPEG stands for Joint Photographic Experts Group, which is also the name of the committee that created this image format back in 1992. This section offers a comprehensive look at JPEG, including its origins, the technology that powers it, and its most common use-cases.

Historical Background of JPEG

Created under the auspices of the International Organization for Standardization (ISO), JPEG became one of the earliest image formats aimed at compressing pictures with a focus on reducing file size. Over the years, it has become one of the most universally accepted and utilized image formats.

Compression Algorithm

At the core of JPEG’s popularity is its effective use of a lossy compression algorithm. This means that some image data is discarded to significantly reduce the file size. While this makes for smaller files, the trade-off is a potential reduction in image quality, especially when compressed at lower bit rates.

Chroma Subsampling

Another feature that contributes to JPEG’s smaller file size is chroma subsampling. This process reduces the color information in the image, while retaining as much luminance or brightness data as possible.

As human vision is more sensitive to brightness than to color variations, this usually results in a visually acceptable image despite the data loss.

Quantization and Huffman Coding

JPEG compression involves two more steps—quantization and Huffman coding. Quantization simplifies the image’s color spectrum, reducing the number of colors and thereby making the file size smaller.

Huffman coding then encodes the image data in a way that requires less space, employing a variable-length code table for encoding a source symbol where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.

Common Use-Cases and Prevalence

JPEG images are widely used across various platforms and applications. From web pages and digital advertising to photography and data storage, the use of JPEG is ubiquitous.

It is supported by virtually all types of hardware and software that deal with image processing, making it an accessible option for many people and businesses.

What is HEIF?

HEIF, or High Efficiency Image Format, is a relatively new player in the field of image formats, having been introduced in 2015. It’s a format that offers advanced compression methods and a range of additional features.

The Emergence of HEIF

HEIF was developed by the Moving Picture Experts Group (MPEG) and is part of the MPEG-H Part 12 standard. It was created to overcome some of the limitations seen in older formats like JPEG.

The format gained widespread attention when Apple began to support it in its devices starting from iOS 11.

Compression Technology

Unlike JPEG, which uses a lossy compression technique, HEIF can employ either lossy or lossless compression, giving it a greater degree of flexibility. It primarily uses the High Efficiency Video Coding (HEVC) compression algorithm.

This makes it more efficient at reducing file size while maintaining high image quality.

Advanced Features

HEIF is not just about still images. It can also contain image sequences, video, audio, and text, allowing for richer multimedia experiences.

This makes it a more versatile option for a wide range of applications beyond simple image storage.

Comparing File Sizes

One of the most compelling advantages of HEIF over JPEG is its efficiency in file size reduction. HEIF files are generally 50% smaller than their JPEG counterparts when compared at similar quality levels.

This efficiency doesn’t come at the cost of quality, making HEIF a highly desirable format for both professionals and casual users.

Where is HEIF Most Used?

Due to its newer emergence and higher computational requirements, HEIF is most commonly found in more modern systems and devices. Apple’s adoption of the format has played a significant role in its popularity, and it is increasingly being supported by other major tech companies as well.

It’s especially useful in applications where both high image quality and low file size are crucial.

Quality Comparisons

Image quality is arguably one of the most critical aspects people consider when choosing a format for digital photography. JPEG and HEIF each have their own methods of preserving quality while compressing file sizes.

The Fundamentals of Image Quality

Image quality is influenced by various factors, including resolution, color depth, and compression artifacts. High-resolution images with rich colors are usually seen as high-quality, but poor compression can introduce issues like blurriness and banding.

JPEG’s Quality Metrics

JPEG uses a lossy compression algorithm, which means some data is lost during the compression process. This data loss can manifest as visual artifacts, especially in images with sharp contrasts or intricate details.

Quality settings in JPEG, often on a scale from 0 to 100, allow users to control the level of compression and, consequently, the quality of the final image.

HEIF’s Approach to Quality

HEIF employs more modern compression techniques based on the High Efficiency Video Coding (HEVC) standard. Unlike JPEG, HEIF has the capacity to store images with a higher dynamic range and greater color accuracy.

Its compression algorithm is designed to minimize artifacts, thus often resulting in higher quality images at smaller file sizes.

Quality in Real-world Scenarios

When it comes to practical application, many users find that HEIF offers superior quality, particularly in scenarios requiring high dynamic range, such as sunset photos. However, JPEG can still offer very good results and is sometimes preferred for its compatibility and ease of use.

Benchmarks and Testing

Several tests and benchmarks show that HEIF tends to outperform JPEG in retaining image quality while reducing file size. Even when both are set to similar compression settings, HEIF usually provides a clearer image with fewer artifacts, making it a preferable option for those prioritizing quality.

File Size and Compression Efficiency

Man holding DSLR camera

When it comes to digital images, the balance between file size and image quality is always a pressing concern. Smaller files are easier to store and faster to transmit, but the compression must not sacrifice too much quality.

Defining File Size and Compression Efficiency

File size refers to the amount of storage space that an image consumes, usually measured in bytes or multiples thereof like kilobytes (KB), megabytes (MB), etc. Compression efficiency, on the other hand, refers to the capability of an image format to reduce file size while maintaining acceptable image quality.

It’s a measure that evaluates the balance between size and quality.

HEIF vs. JPEG: A Statistical Perspective

Several studies have shown that HEIF images generally occupy about 50% less storage space than JPEG images of comparable quality. For instance, a high-quality JPEG image that takes up 4 MB could potentially be compressed to just 2 MB in HEIF format without significant loss in visual quality.

Trade-offs Between File Size and Quality

While HEIF’s compression algorithm allows for smaller file sizes, it’s worth noting that smaller isn’t always better. High levels of compression can result in artifacts or blurriness.

JPEG, due to its lossy nature, can also display similar issues when overly compressed. However, the more advanced compression techniques in HEIF generally result in fewer artifacts, offering a better quality-to-size ratio.

Impact on Storage and Transmission

The smaller file sizes achieved through efficient compression have far-reaching implications. For storage, it means you can store more high-quality images in limited space, an advantage that’s particularly beneficial for devices with limited storage capacity.

For transmission, it implies faster upload and download times, as well as quicker image rendering on web pages, which can improve user experience.

Advanced Compression Features in HEIF

One of the unique aspects of HEIF is its ability to store multiple images in a single file container, a feature that can also contribute to storage efficiency. These can be different versions of the same image, like thumbnails and previews, or they can be entirely different images.

By doing this, HEIF provides another layer of efficiency that goes beyond simple compression algorithms.

Compatibility and Software Support

While the technical merits of an image format are crucial, they don’t tell the whole story. The level of software and hardware support an image format receives is an equally important factor that influences its adoption and usability.

The Ubiquity of JPEG Support

JPEG has been around for more than two decades and has achieved near-universal support across a myriad of devices and platforms. Whether it’s digital cameras, smartphones, PCs, or web browsers, JPEG is almost always an accepted format.

Its widespread support makes it a safe choice for most applications, even if it may not always be the most efficient option available.

The Rise of HEIF Support

HEIF is relatively new, and initially, its compatibility was fairly limited. However, that has been changing steadily.

Apple’s decision to adopt HEIF for its iOS and macOS platforms has been a major milestone, boosting the format’s popularity and support. Android and Windows have also started to include HEIF support, and it’s becoming increasingly common in image editing software.

Platform-Specific Challenges

While HEIF support is growing, it’s not yet as widespread as that for JPEG. Older devices and certain operating systems may not support HEIF, which can create issues for sharing and displaying images.

Some online platforms may also not support direct HEIF uploads, requiring conversion to a different format, usually JPEG, which could involve a loss in image quality.

Proprietary Software and Plug-ins

For those who rely on specific image editing software, it’s crucial to note that not all applications fully support HEIF. However, some software companies offer plug-ins to add HEIF support to existing programs.

Conversely, JPEG enjoys native support in almost all image-related software, from photo editing applications to web design tools.

Licensing and Legal Aspects

JPEG is free from licensing fees, which contributes to its universal adoption. HEIF, on the other hand, involves licensing of the underlying HEVC compression technology. 

While this is generally not a concern for end-users, it can influence the decisions of software developers and hardware manufacturers regarding HEIF support.


Choosing between HEIF and JPEG for image storage and transmission is not merely a question of age-old reliability versus cutting-edge innovation. Both formats offer a unique set of advantages and limitations that make them suitable for different use-cases.

JPEG, a format that has stood the test of time, provides universal compatibility and simple yet effective compression methods. On the other hand, HEIF brings advanced features, more efficient compression, and potentially higher image quality to the table.

However, it still lags behind JPEG in terms of widespread software and hardware support. Licensing concerns also add an extra layer of complexity to HEIF’s adoption. 

Ultimately, the choice between these two formats will hinge on specific needs, including the balance between file size and image quality, as well as the software and hardware ecosystems in which the images will exist. Both HEIF and JPEG have a role to play in shaping the future of digital imagery, and understanding their respective merits and drawbacks is crucial for optimizing image storage and display solutions.