Guide to SDR and HDR Image Formats: JPEG, JPEG XL, AVIF and HEIC

True HDR photography provides an exciting opportunity to bring your RAW photographs to life, revealing brightness and colour that conventional SDR presentation cannot show. Choosing the right image formats helps preserve that potential, while making the photographs practical to store and share.

My recommendation is lossless RAW preservation, high-quality lossy finished masters, and efficient lossy web delivery. The compression choice changes with the job the file needs to do.

Before editing, lossless compression preserves the RAW image values so that substantial changes to shadows, colour or contrast do not reveal damage caused by discarded RAW data. After editing, I can assess compression against the appearance I have chosen. Both my finished SDR JPEG and HDR JPEG XL masters use high-quality lossy compression. My website then serves further resized and compressed viewing copies suited to the visitor’s screen. The aim is efficiency at every stage, while preserving editing freedom and the intended appearance of the finished photograph.

My approach is to preserve image quality as efficiently as possible. I use lossless compression inside DNG for the RAW data, keep independently finished SDR JPEG and HDR-only JPEG XL masters, and create viewing copies for their destinations. My websites now prefer JPEG XL HDR where supported, with SDR-base gain-mapped AVIF as the fallback. Separating the masters from delivery files lets the photographs remain useful as browsers and formats evolve.

This guide explains those choices using my own tests, alongside the technical research behind the formats. JPEG XL now has three roles in my workflow: lossless RAW compression inside DNG, high-quality edited HDR masters, and compact HDR viewing copies. AVIF provides adaptable HDR/SDR delivery and efficient SDR-only images; HEIC remains useful for particular applications.

Current website delivery: JPEG XL HDR with an AVIF fallback

The galleries and updated article embeds now offer automatic format selection. When a browser can decode JPEG XL and reports a high-dynamic-range display, the viewer prefers a direct HDR JPEG XL viewing copy. Otherwise it uses the gain-mapped AVIF. The AVIF contains the independently finished SDR base plus a full-resolution gain map, allowing compatible software to reconstruct HDR; software that decodes AVIF but ignores its gain map can show the SDR base.

The viewer shows which format is being delivered and provides a manual format choice for comparison. A successful JPEG XL decode test and an HDR display report are useful capability checks, not guarantees of identical rendering on every device. Display settings and browser rendering still matter. SDR-only albums remain SDR-only.

My current JPEG XL delivery setting is distance 2, effort 5, encoded from a 16-bit PQ HDR input, without a gain map. The gain-mapped AVIF recipe is Q65 for both the SDR base and gain map, encoder speed 4, 10-bit precision, 4:4:4 colour sampling and a full-resolution gain map. These are viewing-copy settings, separate from the settings used to retain the masters.

In my comparisons, JPEG XL at distance 2 retained fine texture particularly well. AVIF Q65 sometimes softened that texture on close inspection, although the difference was less obvious at normal Retina viewing sizes. JPEG XL also encoded faster and was smaller on average than the gain-mapped AVIFs in my tested set. These are results for these photographs and settings, not a universal ranking of the formats or an equivalence between distance 2 and Q65. The matched JPEG XL and AVIF comparison lets you inspect the images and file sizes yourself.

Delivery sizes extend up to 5120 pixels. The viewer selects a suitable source for the fitted image dimensions and screen pixel density, rather than downloading the largest file for every view. It can show an already-loaded preview while the larger image decodes. Article embeds use the same dual-format approach and responsive image sizes.

Output sharpening belongs in delivery, not in the masters. New viewing copies are resized with Lanczos and receive modest sharpening at their final dimensions. The retained masters are unchanged. Existing SDR images are not sharpened twice, and noise reduction is not part of the delivery recipe.

Try the HDR JPEG XL demo gallery and their format controls. The earlier experiment findings document how the delivery approach developed; older Q70 recipes and HDR-only AVIF trials are historical rather than the current default.

Why JPEG XL is practical on the web now

JPEG XL is now available in stable Chrome and Firefox as well as Safari. The October 2026 releases materially widen the audience that can open JPEG XL photographs. This makes it a practical format to serve today alongside an AVIF fallback, rather than something websites must wait to try.

Browser developments checked on 4 November 2026.

  • Safari 17 – 18 September 2023: Apple added JPEG XL image decoding. This established support for opening the format in Safari. WebKit’s Safari 17 release announcement.
  • Safari 26 – 15 September 2025: WebKit added HDR still-image presentation on the web. This is a separate milestone from the earlier ability to decode JPEG XL. WebKit’s Safari 26 announcement.
  • Chrome 155 – 6 October 2026: Google announced that JPEG XL decoding was shipping in stable Chrome, using the new Rust-based jxl-rs decoder. This is released support, rather than an experimental flag or a future intention. Google’s JPEG XL announcement.
  • Firefox 158 – 13 October 2026: JPEG XL decoding became enabled by default. Mozilla’s implementation notes distinguish this from HDR presentation: they describe HDR images being displayed as SDR. Firefox’s JPEG XL support therefore widens format access, but should not automatically be counted as HDR display support. Firefox 158 release notes and Mozilla’s implementation notes.

The practical response is to offer both formats and select the appropriate viewing copy. My demo gallery already serves real HDR JPEG XL photographs to compatible HDR configurations, with gain-mapped AVIF as the fallback. Wider support can benefit visitors through the existing delivery system.

What these releases establish – and what still depends on the device

Opening a JPEG XL file, displaying its HDR brightness and progressively rendering it during download are separate capabilities. Browser version, operating system, display and settings all affect the result. A browser’s JPEG XL support is not a measurement of the proportion of visits able to display HDR JPEG XL.

Chrome’s announcement establishes Chrome support. It should not be treated as confirmation that Edge, Brave, embedded browsers or every other Chromium-based product has enabled the same feature. Microsoft’s Edge 155 web-platform notes do not currently confirm JPEG XL support.

The AVIF fallback remains part of this website’s current system. These releases do not establish a date for removing gain maps: that decision depends on reliable HDR JPEG XL presentation across the audience the fallback needs to serve. The efficiency article models that later opportunity separately from today’s delivery.

Choose the format for the job it needs to do

PurposeMy choiceWhat it preserves or delivers
Stage 1: preserve RAW dataDNG with lossless JPEG XL compressionThe decoded RAW image values, stored efficiently for future processing.
Stage 2: preserve SDR and HDR mastersHigh-quality SDR JPEG plus HDR-only JPEG XL, Adobe quality 11Independently finished, full-resolution photographs kept for long-term reuse.
Stage 3: publish photographsJPEG XL HDR where supported; gain-mapped AVIF fallback; SDR-only AVIF for SDR albumsResponsive viewing copies, selected automatically with an option to compare formats.
Use a particular application or sharing serviceA supported viewing/export format, including HEIC or gain-mapped JPEG where neededA destination-specific copy, without changing the master-format decision.

Figure 1 brings the three stages together. Preserve the RAW data efficiently, keep separate finished SDR and HDR masters, then generate the viewing copies required. Websites now prefer direct HDR JPEG XL on compatible HDR configurations and fall back to SDR-base gain-mapped AVIF. Destination-specific exports, such as Instagram gain-map JPEGs, can be made separately when required.

The demo gallery serves real HDR JPEG XL photographs where supported, with gain-map AVIF as the fallback. Format selection is automatic.

1
Preserve the RAW data efficiently

Camera RAW file or existing DNG

Optimised DNG RAW file
More efficient lossless compression

2
Produce optimum standalone SDR and HDR masters

Shared editing → SDR and HDR finishing

SDR master
High-quality JPEG

HDR master
HDR-only JPEG XL · quality 11

Keep the full-resolution masters

3
Create viewing copies

Websites and galleries

Preferred: JPEG XL HDR · distance 2Fallback: SDR-base gain-mapped AVIFSDR albums: SDR-only AVIF

Optional Instagram export

Gain-map JPEG · 2160 × 1440

Resize and sharpen delivery copies; keep masters unchanged

Figure 1. Preserve your RAW data, produce SDR and HDR masters, then create viewing copies.
The same masters supply JPEG XL HDR and gain-mapped AVIF for websites, with separate exports for other destinations when needed.

The True HDR photography workflow explains the processing and settings in more detail. Here, the question is why each format earns its place.

Conventional JPEG remains useful, but new formats are more efficient

JPEG was standardised in 1992 and made digital photographs easy to store, publish and exchange. Its broad compatibility remains valuable. I recommend a high-quality JPEG for the independently finished SDR master, alongside an HDR-only JPEG XL when both versions are wanted. Existing SDR JPEGs can continue to serve this role: there is no need to re-edit or convert the whole collection.

The familiar JPEG workflow usually stores an 8-bit SDR rendering. Eight bits provides 256 values per channel, which limits how finely a tonal range can be represented. Bit depth, colour gamut and dynamic range are related but different: a colour profile defines the gamut, while the transfer function helps determine how encoded values represent light. An 8-bit JPEG is not automatically restricted to sRGB.

Modern formats give us more efficient compression and better ways to encode high-bit-depth HDR images. That matters when trying to retain smooth gradients, fine detail and bright highlights while keeping file sizes sensible. It also matters for SDR websites: a smaller, well-encoded viewing copy can reduce the amount visitors need to download.

An AVIF made from an existing JPEG cannot recover detail that the JPEG has already discarded. The opportunity is to preserve its appearance in a more efficient delivery file, or to produce a better viewing copy from a higher-quality source where one is available.

JPEG XL serves RAW preservation, HDR masters and web delivery

JPEG XL is my preferred format family for the core photographic workflow. It combines lossless and lossy compression with high bit depth, wide colour gamut and HDR support. Its progressive decoding also offers the possibility of displaying an initial image before the complete file arrives. The JPEG committee’s overview explains these capabilities.

A useful additional feature is reversible recompression of existing JPEGs. Suitable JPEG XL tools can store those JPEGs more efficiently and reconstruct the original JPEG bitstream. That is different from exporting a newly edited image, and it does not mean a conventional JPEG viewer can directly open a .jxl file.

Stage 1: compress the RAW data without throwing image information away

There can be a substantial storage opportunity before a photograph is even edited. My research covered 23,078 original camera photographs and their optimised DNG versions. With the same mix of cameras and recording settings, 10 TB of original camera files would become approximately 5.3 TB. Preserving the RAW data efficiently can release considerable room for the finished photographs.

I recommend the current Adobe DNG Converter with lossless JPEG XL compression explicitly enabled. Simply accepting the default lossless conversion is not enough: I initially overlooked this myself. Adobe’s converter documentation distinguishes the default compression from the -losslessJXL option.

The resulting file is still a DNG containing RAW image data, not an edited .jxl photograph. Lossless compression preserves the decoded image values exactly. DNG conversion changes the surrounding file structure, however, and metadata, previews and software compatibility still need checking. It does not make the complete file identical to the camera original.

There is also an opportunity for existing DNG collections. Recompressing 173,061 files recovered a further 1.18 TB from DNGs that already used older lossless compression. My detailed lossless DNG study presents both experiments, the camera results, conversion settings and verification. The benefits apply equally to SDR and HDR photography.

Stage 2: preserve the finished HDR photograph without enormous files

I initially recommended lossless JPEG XL for edited masters. It worked well for many images, but some exports became impractically large. One photograph produced a roughly 243 MB lossless master from a DNG of about 50 MB. The rendered image contains full-colour, high-bit-depth information at every pixel; it is not the same representation as a typical mosaic RAW. Texture and noise can also make that result expensive to compress losslessly.

My recommendation for the HDR master is full-resolution, 16-bit HDR P3 JPEG XL at Adobe Camera Raw quality 11, without a gain map. This is high-quality lossy compression. For photographs intended for both types of display, keep an independently finished high-quality SDR JPEG alongside it, with matching crop and dimensions. Camera Raw’s secondary SDR controls have not given me the same result as editing specifically for SDR, so I prefer to keep the two approved versions. The workflow guide explains the editing steps and settings.

Lossless RAW storage and lossy edited masters serve different purposes. Brightening deep shadows in a cathedral can reveal information that seemed insignificant before editing; preserving the RAW data keeps that latitude available. Once the photograph is finished, compression can be judged against its intended appearance. In my original 5000 × 3333-pixel comparison below, I could not see a difference between the 58.8 MB lossless export and the approximately 6 MB quality-11 version. Keep any layered Photoshop work separately if you need to revisit its layers.

Original chart showing JPEG XL file size at different Adobe Camera Raw quality levels.
Figure 2. My original JPEG XL quality comparison. Quality 11 produced a file of about 6 MB, compared with 58.8 MB for lossless; the source photograph was 5000 × 3333 pixels.

A separate, more recent calibration produced a 228.38 MB lossless file and a 17.79 MB quality-11 file. That reinforces the practical case for a high-quality lossy master, but it is a different photograph from Figure 2. Quality 12 remains an option when a particular image needs a larger margin, and lossless remains available when exact rendered-image preservation is required.

Keep the technical distance scale separate from Adobe’s quality slider

JPEG XL technical discussions often express compression in terms of distance. Lower values target greater fidelity. The reference encoder documentation identifies distance 0 as mathematically lossless and describes distance 1 as a setting that should be visually lossless. “Visually lossless” remains a perceptual assessment, not exact preservation of every image value.

The SSIMULACRA 2 documentation gives distance 0.5 as a typical JPEG XL setting corresponding to a high perceptual score of 90. My file-size calibration placed Adobe quality 11 at approximately distance 0.38. That is a size-matching estimate, not an official Adobe conversion or proof of identical visual quality. It supports choosing a generous margin alongside examining demanding highlights, gradients and fine detail on an HDR display.

For web delivery I use distance 2, which is more compressed than my Adobe quality-11 master. My viewing tests found a good balance of fine detail and file size at this setting, while distance 3 made some detail loss more noticeable. Distance 2 is not mathematically lossless, and it has no fixed quality equivalence to AVIF Q65. Keep the master and delivery settings separate.

JPEG XL masters are useful before any web conversion. I use them in my Apple workflow, including Photos/iCloud, Keynote and Final Cut Pro slideshows. The file can serve several purposes while the RAW archive preserves the opportunity to start again.

Browser capability determines which viewing copy is delivered

My viewer tests whether the browser can decode a small JPEG XL image and checks its reported HDR display capability. Automatic mode prefers JPEG XL only when both checks pass, with SDR-base gain-mapped AVIF as the fallback for HDR photographs. Visitors normally download the selected rendition, not both formats for the same view. SDR-only albums use SDR-only AVIF. This avoids relying on a browser name or a fixed compatibility list. An HDR report does not prove that HDR is active or that every image will render correctly; the manual format control lets visitors compare the alternatives.

The format’s relevance also extends beyond photography applications. The PDF Association describes its promotion of JPEG XL as the preferred new HDR image format for PDF. This is evidence of wider interest, not a claim that every PDF reader can already display it.

For deeper technical background, see the JPEG XL white paper and codec developer Jon Sneyers’ The Case for JPEG XL. Their explanations provide context; the storage measurements here come from my own photographs.

AVIF provides efficient SDR delivery and an HDR fallback

AVIF uses AV1 image coding and supports HDR, wide colour gamut, high bit depth, transparency, and both lossy and lossless compression. The Alliance for Open Media documents these capabilities and its support across major browsers. That makes it a useful delivery format for both my SDR and HDR photographs.

My websites have used SDR AVIF images for several years, and I also publish HDR AVIF examples. The attraction is straightforward: retain the appearance I want while reducing the data needed to show it. The exact saving depends on the photograph, dimensions, encoder and quality settings. AVIF format support does not by itself establish HDR display or gain-map support on every browser and operating-system combination.

For my purposes, JPEG XL and AVIF complement each other. JPEG XL stores the finished HDR master and provides the preferred HDR viewing copy. The independently edited JPEG preserves the SDR version; gain-mapped AVIF combines that approved SDR base with HDR information for adaptable delivery. Keeping both masters gives me control over the photographs without requiring separate galleries.

Stage 3: publish responsive JPEG XL and AVIF viewing copies

For SDR-only photographs, I use SDR AVIF viewing copies. For HDR photographs, I generate direct HDR JPEG XL copies from the HDR master and gain-mapped AVIF copies from the matched SDR and HDR pair. The gallery or article embed selects between the available versions automatically and offers a manual choice. Direct HDR-only AVIF remains useful for experiments, but it is not the main fallback for paired-master galleries.

The gain-mapped AVIF fallback uses the independently finished SDR image as its base. The libavif combining tool provides the paired-image capability. This preserves an intentional SDR rendition while allowing compatible viewers to reconstruct HDR. Browser support for AVIF decoding and support for HDR gain maps are separate capabilities.

My Mac generates the viewing copies in a size ladder up to 5120 pixels. Each new derivative is resized and then sharpened for output; this sharpening is kept out of the retained masters. Cloudflare delivers the finished public files while the website supplies the pages. Responsive selection matches the file dimensions to the displayed image and screen pixel density.

The complete publishing route is working, from local gallery folders through conversion and upload to the website’s gallery directory. Viewing files have stable, content-based identities so unchanged images can be reused across galleries.

This is a personal publishing system, designed around the functions I need. It is also the practical reason for this format research: I want to make more of my photographs available and explain what the experiments reveal.

Gain-mapped JPEG: a specific role for Instagram

A gain-mapped JPEG, often called Ultra HDR, combines a conventional base JPEG with an additional gain map and metadata. Compatible software uses those components to reconstruct an HDR rendition; older software can show the base SDR image. The Ultra HDR specification allows single-channel or multi-channel gain maps and colour profiles such as Display-P3.

It can therefore display genuine HDR and is not inherently restricted to sRGB. The reconstructed image uses information from more than the base JPEG alone. These distinctions matter, even though I prefer a different approach for my own photography.

My own testing has found that gain-mapped JPEGs can be significantly larger and display more artifacts (at relatively high levels of compression) than gain-mapped AVIFs.

In earlier testing, the 2000 × 1333-pixel gain-mapped AVIF below occupied only 88 kB. The equivalent gain-mapped JPEG was 246 kB, nearly three times as large. Despite that size increase, close inspection revealed artefacts in the JPEG that I did not see in the AVIF.

Original HDR AVIF photograph used in the comparison with gain-mapped JPEG.
The original 2000 × 1333-pixel AVIF example, reported at 88 kB. This earlier test used a gain map; it is separate from the new gallery delivery experiment.
Original comparison detail showing the artefacts observed in the larger gain-mapped JPEG.
The original comparison detail. The gain-mapped JPEG occupied 246 kB and showed visible artefacts in my inspection.

This earlier comparison explains why I chose gain-mapped AVIF over gain-mapped JPEG for website delivery. It remains a useful fallback alongside the newer JPEG XL HDR route. Gain-mapped JPEG has a separate, optional role when exporting for Instagram; it is not an additional gallery generated by every publish.

Gain maps and the choice of compression format are separate decisions

Gain maps are not exclusive to JPEG. Adobe’s explanation describes a base rendition, gain map and metadata that allow the display to adapt between SDR and HDR. The base can itself be SDR or HDR. This can provide author control over the SDR rendering and adaptation to the display’s capacity.

The important distinction is between creating the SDR photograph and packaging it with HDR for viewing. Limitations in Camera Raw’s secondary SDR editing controls do not mean gain maps themselves are inherently poor. My recommendation is to retain the two approved masters without adding a gain map to the HDR JPEG XL, then combine the pair for gain-mapped AVIF delivery when needed. Direct HDR JPEG XL viewing copies come from the HDR master alone and contain no gain map. That avoids extra work and data in the HDR master while keeping the combined route open. Greg Benz discusses the importance of a carefully prepared SDR version; his format guide covers broader sharing options.

HEIF and HEIC remain useful for particular Apple workflows

HEIF is a container format; HEIC commonly refers to HEIF images encoded using HEVC. They are not Apple-owned formats, although Apple’s adoption made them familiar to many photographers. Adobe’s HEIC comparison explains the distinction from ordinary JPEG and the role of efficient compression.

In my Apple workflow, HEIC/HEIF remains useful for certain captures and exchanges. I have also used it for HDR screen captures, such as the example below, converted to AVIF for display on this website. Keeping that practical use does not require choosing HEIC as the main edited archive format.

Example originally captured in HEIF on macOS and converted to AVIF for this website.
An example from my HDR screen-capture workflow: HEIF for capture, AVIF for web presentation.

Camera Raw can read supported HEIC files, and I have used Preview’s export route when an Apple application needs an HEIC version. Export options and HDR behaviour depend on the software and source image. My photography workflow explains which masters I retain and how viewing copies fit around them. A destination copy can be made from the JPEG XL master without reorganising the archive around that destination.

Likewise, an iPhone ProRAW file is a DNG containing computationally processed RAW data, rather than an ordinary edited .jxl image. Apple explains that distinction. The compression used inside a particular ProRAW file should be checked rather than inferred from the phone’s name or the .dng extension.

A durable workflow leaves room for better delivery formats

The most useful outcome is a lasting foundation: preserve the RAW data efficiently, create separate SDR and HDR masters, and keep them for the long term. Conventional JPEG gives the SDR photograph broad immediate usefulness; high-quality lossy JPEG XL makes the HDR master manageable. The viewing files can evolve without repeating the creative editing.

JPEG XL now serves all three stages: lossless compression inside RAW DNGs, high-quality lossy HDR masters, and smaller lossy HDR viewing copies. For website delivery, automatic selection prefers JPEG XL on compatible HDR configurations and uses gain-mapped AVIF otherwise. The AVIF base also preserves the independently finished SDR appearance.

This dual-format delivery is already working, so wider JPEG XL support can benefit visitors without another website redesign. Progressive JPEG XL decoding remains a separate opportunity to investigate: the format supports it, but the current viewer does not promise a progressively refining image while downloading. Its immediate preview followed by a decoded larger image is a different behaviour.

This gives me a way to progress now: publish more photographs, integrate them naturally with articles and galleries, and use the results to refine these guides. The aim is to make photography easier to preserve and more rewarding to view, with the format choices serving that purpose.

For the measured storage savings and the reasons behind this choice, see my comparison of lossy DNG with optimised lossless RAW.

Continue with the True HDR photography workflow, the gallery experiment, or see sample HDR photographs and La Sagrada Família in HDR.

If reliable HDR JPEG XL support reaches the browsers and devices my visitors use, I could simplify website delivery to SDR-only AVIF from the SDR master and direct HDR JPEG XL from the HDR master. This would remove gain-map generation from this website pipeline. It is a possible future change, rather than the current default: I would check actual HDR rendering, visual quality and file sizes before making it. Gain-mapped AVIF remains a useful compatibility option today.

Explore next

Browse all HDR guides →

Last updated: 4 November 2026