The Big Experiment: building my own CDN-based HDR image delivery system

I see enormous potential in True HDR Photography to revolutionise still photography and yet my own photography journey has been held up by weaknesses in current commercial image web delivery systems.

1094_1a — Combined gain map (SDR base)

I have used Smugmug for many years, but it does not currently support HDR images. While WordPress currently allows HDR AVIF files to be added to the Media Library, the HDR information does not currently survive the processing undertaken to create smaller images (used to serve devices such as mobile phones). While Instagram allows the uploading of HDR images, creation of compatible images has proved problematic for many photographers, with some resorting to a paid Photoshop plugin. Rather than waiting for these commercial systems to be improved, I decided to create my own system! That journey is my Big Experiment. And the good news is that this system is operational and working! View my test galleries. The system:

  • offers gallery display functionality like Smugmug for the display of HDR (and standard) images
  • utilises efficient, next-generation AVIF file formats to minimise loading times
  • provides a variety of image sizes to optimally serve different devices and screen sizes
  • provides the HTML code to allow images to be easily embedded within WordPress pages (as shown with the image below)
  • produces compatible Instagram HDR images without the need for a paid plugin.
_dsc4649 — Combined gain map (SDR base)

Why I built my own galleries

SmugMug has served my photography for years, but my requirements outgrew what my existing setup delivered. Several frustrations came together:

  • I want to share HDR photographs properly. I have spent considerable time editing and exploring HDR images locally, but my existing SmugMug galleries do not provide the HDR presentation I want. Waiting for that capability is holding back what I want to publish.
  • My SDR photographs should benefit from modern delivery too. My current galleries deliver JPEGs, while the rest of my websites already uses AVIF. I want to explore the same opportunity for smaller, high-quality viewing files across my photographic collections.
  • The journey from an article to its photographs feels disconnected. Moving into a separately hosted gallery changes the presentation and navigation. I want readers to move naturally between a story and its photographs, within the same website experience.
  • Publishing a gallery takes too much effort.Creating and maintaining the HDR galleries on my WordPress site has been cumbersome. I want to organise the photographs on my Mac, generate the viewing files and publish them without repeatedly assembling everything by hand.
  • I want more control over quality and speed. I have experienced slow and interrupted viewing in my existing galleries. I want to choose the image sizes, formats and delivery approach myself, then measure whether the new system improves the experience.
  • The current workflow makes comparisons harder than they should be. I want to compare the same photographs in different formats and sizes, on real web pages, without each comparison becoming another awkward publishing exercise.

I have waited in the hope that the systems I use would bring these capabilities together. I do not know if or when they will. In the meantime, that waiting has slowed down my own photography and website work. Rather than continue waiting, I decided to build the capability I need.

I suspect other photographers will recognise some of these frustrations. Although I have been building this for my own use, I hope the approach and the findings will help others make better decisions about their own images and galleries.

_dsc5160sunset — Combined gain map (SDR base)
What I found when trying existing services — December 2025

These are brief accounts of the tests behind my original article on HDR file formats and sharing. They record my experiences in December 2025, rather than a continuously updated comparison of the services. Together, they explain why support for a format was not enough to give me the publishing system I wanted.

SmugMug

I had used SmugMug for years and valued its gallery customisation and folders containing multiple galleries. However, my existing galleries did not provide HDR display, and delivered conventional JPEG viewing files. The separate gallery experience and the slow or interrupted viewing I encountered also strengthened my desire for a system more closely integrated with my own websites.

Apple Photos and Apple TV

Apple Photos gave me the most useful format support in these tests, including JPEG XL, AVIF and HEIC. HDR videos were available for viewing promptly. Sharing was another matter: Shared Albums reduced image sizes and removed HDR from my videos, while Shared Photo Library did not provide the individual, curated galleries I wanted to share. In my tests, thumbnails and slideshows were not shown in HDR, and Apple TV’s Photos app did not display my still photographs in HDR. Good support for viewing individual files did not translate into the collection-sharing experience I needed.

Google Photos

I could upload AVIF photographs but did not see them displayed in HDR, and I could not upload JPEG XL files. Gain-mapped JPEGs displayed in HDR in my successful tests, but my exports showed artefacts and banding that required larger files to control. Thumbnails and Safari viewing added further limitations in those tests, and processing delays made HDR video frustrating too.

Zonerama

Zonerama stood out because it displayed both gallery thumbnails and opened photographs in HDR. My Camera Raw AVIF exports worked when Maximise Compatibility was turned off. However, I found gallery customisation limited, the presentation visually busy and the service and application slow to use. It demonstrated that HDR galleries were possible, but did not meet my wider requirements.

Adobe Lightroom’s online albums

In my tests, clicking a photograph opened an HDR view, but the thumbnails and slideshow did not show HDR. That mattered because a gallery’s first view is part of the photographic presentation, not simply a way to reach a larger file.

The lesson I took from these experiences was to define the complete experience I wanted: image quality, useful galleries, straightforward sharing, responsive delivery and a natural connection with my websites. I can assess improvements in any service against those needs, while getting on with my own project.

How the working gallery system operates

The principle is straightforward: keep high-quality masters on my Mac, use the Mac to prepare the web versions, and publish only the files visitors need. My website provides the gallery experience; Cloudflare stores and delivers the prepared images. The diagram shows how those responsibilities fit together.

One master pair, two publishing routes

Keep the masters private. Prepare the images once. Deliver them efficiently.

MY MAC · Storage, creative control and processing

The centre of the system — retained locally, with separate backups.

1 · My master image collection

Gallery folders containing independently finished SDR JPEG masters and HDR JPEG XL masters, where available.

The approved versions I keep for the long term. Original RAW files remain in my private archive.

Read the masters — leave them unchanged↓
2 · Prepare destination-specific outputs

Resize, sharpen and encode viewing copies. Websites: SDR AVIF, HDR-only AVIF and SDR-base gain-mapped AVIF. Instagram: a separate gain-map JPEG from the same matched masters.

Prepare the SmugMug size ladder up to 5120 pixels, reuse the 2048-pixel version for standard web articles, and create gallery information and stable image links. Apply output sharpening after resizing; leave the masters unchanged. I choose the photographs, their order and how they are grouped.

3 · Publish the prepared outputs through two parallel routes

From the preparation stage ↓

Websites and galleries · AVIF

Responsive viewing files up to 5120 pixels, including SDR-base gain-mapped AVIF for SDR and HDR displays.

mark-heath.com supplies the pages, gallery viewer and responsive image references.

Cloudflare stores and delivers the prepared image files. No masters or image processing are hosted here.

↓

The visitor’s browser
Shows an appropriate image for the page and screen, with a higher-resolution view on demand.

From the same preparation stage ↓

Instagram · Gain-map JPEG

2160 × 1440 exports from the same independently approved SDR and HDR masters, with an SDR base and full-resolution colour gain map.

The companion gallery makes these prepared JPEGs available for uploading.

Upload to Instagram
Select Original ratio and avoid cropping or applying edits.

↓

Viewers on Instagram
Instagram processes and serves the published post through its own delivery system.

Working architecture. Once the prepared gallery is online, my Mac does not need to remain switched on for visitors to view it.

Global delivery is another part of the performance benefit. My images are served through Cloudflare’s global content delivery network, which can keep cached copies close to visitors in different countries. A cached image can be delivered without fetching it from the original storage location on every visit. This complements my smaller AVIF files and responsive size selection. The same benefit applies to photographs embedded in articles and to gallery images, including larger views requested on demand. This global caching is already part of my setup, rather than an additional upgrade.

_dsc3757 — Combined gain map (SDR base)

What I set out to achieve

  • High-resolution photographs that reward a good display. The system matches the SmugMug delivery size ladder up to 5120 pixels, with intermediate sizes that fit different screens. The aim has been appropriate resolution and responsive viewing, rather than exceeding 5K.
  • Excellent SDR and genuine HDR. The system preserves the independently edited appearance of both versions, including the brightness and colour of HDR on a compatible display.
  • Smaller files and faster viewing. The system demonstrates optimised AVIF can deliver equal or better visible quality with fewer bytes than JPEG delivery, including at higher resolutions.
  • Sharpen for the viewing size. The system keeps output sharpening out of masters and applies it after resizing each delivery copy. This preserves the freedom to change sharpening for future sizes and uses without altering the creative master.
  • Private originals and masters. The web publishing process uploads only viewing copies. My RAW archive and high-quality masters stay on my Mac and in my backups; visitors never receive those master files.
  • Control over my own collection. I can add, remove, reorder and organise photographs locally, with galleries that fit my websites and the stories they illustrate.
  • Responsive website embeds and detail on demand. The system provides an embed code for my WordPress website, including an appropriate larger file when a reader opens the fullscreen view.
  • A simpler, more independent and cheaper publishing system. I now use my Mac for the heavy processing and Cloudflare for delivery, with the ambition of replacing my SmugMug subscription once the system meets my needs.
328 (1)_1a — Combined gain map (SDR base)

Separate SDR and HDR masters that are processed to create image files for web delivery and Instagram

My paired-master workflow serves both destinations. I finish the SDR photograph and the HDR photograph independently, retain both full-resolution masters, and let the publishing pipeline produce the delivery files.

In my own editing, Adobe Camera Raw’s SDR controls within the HDR workflow have not given me the SDR result I can achieve by editing for SDR separately. The experiment therefore starts with independently approved versions and combines them afterwards.

_dsc8058 — Combined gain map (SDR base)

For ordinary web pages and galleries, AVIF remains my preferred delivery format, with responsive sizes and a larger view available on demand.

For Instagram, the same masters now produce a separate gain-map JPEG export. These JPEGs have a specific destination; I am not proposing them as the universal replacement for AVIF on websites.

Built to adapt as image delivery improves

The separation between masters and viewing copies is important for the long term. My finished SDR and HDR masters remain the foundation; the files sent to a browser can change as better delivery options become practical.

Gain-mapped AVIF is the current image format of choice for this system. Looking further ahead, broader browser support could make high-quality lossy JPEG XL an attractive alternative for viewing files, potentially offering smaller downloads at the quality I want, alongside advantages such as progressive decoding. My guide to SDR and HDR image formats discusses these complementary roles and the possibilities for JPEG XL. With my system, I can use the best practical options available today, then improve the delivery as the technology develops.

Last updated: September 2026

Questions and answers

What would the best outcome be?

My ideal outcome would be for established photography services such as SmugMug to embrace these capabilities and make them available to their customers sooner. Photographers should be able to benefit from true HDR without having to build their own publishing system, while continuing to deliver carefully prepared SDR images to people who need them.

I also hope the experiments will help other enthusiasts explore similar systems. I have demonstrated a working approach within my tested setup. Sharing the findings, including the difficulties, could make it easier for others to develop efficient SDR and HDR delivery for their own websites.

Are you competing with SmugMug?

No. This is an experiment in image preparation and delivery, not an attempt to recreate the full SmugMug service. The aim is to show what can already be achieved with modern formats and a relatively focused system. Matching its image-size tiers also gives me a useful basis for comparisons at the same dimensions.

I would much prefer established providers to seize the opportunity. If they do not adopt these capabilities within a reasonable timeframe, I think there could be an opening for an enthusiastic startup to offer them. That is a possible commercial opportunity, not a claim that this experimental system is already a replacement for an established service.

Is this all about HDR?

No. SDR delivery is an important result in its own right. My tests have shown opportunities to compress SDR photographs efficiently with AVIF while controlling their dimensions, quality and output sharpening. That matters even if a visitor never uses an HDR display.

For combined images, I use an independently created SDR image as the base and a gain map to reconstruct the HDR appearance. The intention is to preserve the photographer’s SDR presentation while adding HDR. My results have looked good in the Chrome and Safari configurations tested; they are not a guarantee for every browser or display.

The JPEG delivery I have been comparing with provides a useful reference. Smaller suitable AVIF files can reduce download requirements, but whether a whole service is faster also depends on caching, decoding and the viewer. A fair comparison must measure those as well as file size.

Is the aim always the highest possible image quality?

No. I have chosen Q70 for the new combined AVIF files because I am pleased with the balance of quality, size and responsiveness. This is a photographic preference, not the only useful way to configure the system. Another website owner might reasonably give more weight to reducing page size.

My new fast-delivery gallery uses Q50 for both the SDR base and the full-resolution gain map, with 10-bit 4:2:0 colour. Across test photographs matching 2048-pixel dimensions, my SDR JPEG Q90 reference images totalled 9.87 MB, standard combined Q70 AVIF 7.18 MB, and fast combined Q50 AVIF 2.92 MB!

In my viewing of the full-size Q50 gallery, the photographs still looked very good, with no noticeable banding or major artifacts. I think many viewers would be happy with them. Both galleries now offer the same delivery sizes through 5120 pixels. The fast gallery is a permanent experiment for readers to judge, and I will broaden it with more photographs.

Is this only a system for photo galleries?

No. The wider objective is efficient image delivery throughout ordinary websites. The same prepared images can support both a gallery and an embedded photograph within an article, with a higher-resolution view available when someone clicks. There is no need to generate a separate set of files for every website using them.

The architecture separates image preparation from page publishing. My processing creates the approved sizes, compression and output sharpening while retaining the masters. A content delivery network stores and serves those finished files. The page tells the browser which versions are available, and the browser selects a suitable one for the displayed size and pixel density.

This gives me control over photographic processing without asking WordPress to regenerate the images. The live gallery now provides responsive embed codes to paste into a Gutenberg Custom HTML block. The browser selects an inline image using the page layout and pixel density, rather than sending a fixed 2048-pixel file to every device.

A leaner page framework, such as my move to Gutenberg, and better image delivery address different parts of the same problem. Combining appropriate dimensions with suitable compression may substantially reduce the image payload of photographic pages.

Are quality settings the only way to reduce file size?

No. The current recipe makes several choices in favour of photographic quality. Changing the AVIF quality number is only one of the controls available. Colour sampling, gain-map resolution, image dimensions and encoding effort also influence the result, and they should be tested separately before combining changes.

Colour sampling. My standard Q70 recipe uses 4:4:4 for the base and gain map. The Q50 fast experiment uses 4:2:0 for both and has produced attractive results in my viewing. This gives a practical second delivery choice while retaining the standard recipe.

Gain-map resolution. I currently retain a full-resolution gain map because the reduced-resolution versions visibly lost important HDR detail in my tests. Organ pipes, gold decoration, shields and stonework were particularly revealing. A smaller map may still be acceptable for some photographs or viewing sizes, but it must be assessed in the reconstructed HDR image. An SDR preview alone cannot establish that the HDR result is good enough.

Map encoding quality. The base and gain map have separate quality settings. The standard recipe uses Q70/Q70; the fast experiment uses Q50/Q50. Both retain full-resolution gain maps. Reduced-resolution maps remain a possible future experiment, but I am not pursuing that now because the present savings are already substantial.

Encoding effort. My pipeline prepares the files before publication, so it can spend more time encoding without making visitors wait for that work. I use encoder speed 3, allowing a more thorough compression search than the faster setting tested earlier. In those tests, it improved the measured quality and often reduced size. It did not make every file smaller at the same quality setting, and the further move to speed 2 did not justify the additional time for my chosen workflow.

This flexibility is part of the value of the architecture. I can choose a quality-oriented recipe for a portfolio, or investigate a lighter recipe for ordinary web pages, while retaining the original masters. My present settings demonstrate one successful balance; they do not establish the smallest acceptable payload. Any new balance should be judged on SDR and HDR appearance, file size and actual display performance.

Is the platform limited to AVIF?

No. AVIF is my current delivery choice, not a permanent constraint on the architecture. I retain the independently produced SDR and HDR masters separately from the files prepared for visitors. That lets me generate new delivery versions as formats, browsers and audience requirements change, without having to recreate the photographic edits.

The broader aim is to choose suitable delivery formats for the audience at the time. The platform could be extended to offer different formats from the same masters, but each would need appropriate encoding, metadata, responsive selection and testing.

My earlier gain-mapped JPEG web experiments did not meet my website delivery priorities. I have since produced and successfully uploaded an Instagram set using an independent encoder. Gain-mapped JPEG is now a working destination-specific output, while AVIF remains my website choice. Conventional gain-mapped JPEGs use an 8-bit JPEG base with additional gain-map information for HDR reconstruction.

I am concentrating on AVIF because of the combination of image quality, manageable file sizes and successful SDR-base gain-map tests in my Chrome and Safari setups.

What about JPEG XL?

JPEG XL is a promising candidate for a future delivery experiment. I already use JPEG XL files among my HDR masters, but using a format for a master is a separate decision from delivering it to website visitors. Keeping the masters independent of the delivery copies gives me room to explore both.

Safari added JPEG XL support in version 17. That is a useful starting point, rather than proof that every SDR or HDR presentation I want will work identically across browsers and devices. A delivery trial would need to verify the particular files, colour handling and HDR behaviour, as well as what visitors receive when their browser does not support the chosen format. [2]

A JPEG XL comparison gallery would therefore be a useful next experiment. I could use the same source photographs and output dimensions to compare appearance, file sizes, decoding and perceived loading speed against AVIF. I should test equivalent visual quality or equal byte budgets, rather than matching unrelated encoder quality numbers.

If JPEG XL, or another format, offers a better balance for my visitors in future, the pipeline can evolve to use it. The lasting investment is in the masters and controlled preparation and delivery process; AVIF is the format I have currently selected for that process.

Is this too complicated or dependent on manual work?

No. There is an important difference between developing and testing the system and using the resulting workflow. I have spent time experimenting with settings and investigating browser behaviour, but publishing an album does not require repeating that research or manually preparing every delivery file.

For a new combined gallery, I prepare the SDR and HDR masters, put the matched photographs in the appropriate album folder and run the publishing process. The system matches pairs by filename. It then generates the delivery sizes, applies the configured output sharpening, calculates and encodes the gain maps, and creates the AVIF files using the chosen settings. It also creates the gallery data and uploads the prepared assets to the CDN. The gallery viewer uses that information to display the album and select suitable viewing files.

I do not have to resize, sharpen, encode and upload each version individually. Publishing a Gain Map album now prepares its standard Q70 AVIF gallery, companion Q50 fast AVIF gallery and Instagram gain-map JPEG gallery from the same pairs and order. The live gallery also generates responsive website embed code, including 25 pixels of spacing above and below the image.

Some input remains deliberately photographic. I choose and edit the masters, keep the paired filenames consistent, decide the order and check the results. Publishing is currently started by me. Photo order can be specified in an order.txt file; a simple editable gallery-description file has been proposed but is not yet implemented. The initial technical setup also requires more knowledge than signing up for a hosted photography service.

There is scope to streamline the process further as I establish what is useful. Easier ordering and descriptions, clearer validation of image pairs, and simpler publishing controls could reduce the remaining administration. The aim is to turn the successful experiments into repeatable defaults, so I can spend more time working on photographs.

Someone could potentially develop this kind of architecture into a commercial product, with guided setup, reliable processing and support. That is not what I am currently doing. This is a personal experimental system intended to help me publish my photographs and share the findings. It is already substantially automated, and it may become simpler to operate; it should not be mistaken either for a wholly manual exercise or for a finished product that anyone can install without assistance.

How does a website image expand into a detailed view?

A reader first receives an image suited to its space in the page and the screen’s pixel density. Clicking opens a black-background viewer on the same page, requests native fullscreen where supported, and selects an appropriate larger file from the prepared sizes through 5K. A second click or the close button returns to the article. The larger viewing image is requested when the reader chooses to inspect it.

This is a core requirement for ordinary websites as well as galleries. A 1024-CSS-pixel article can use a 2048-pixel image on a 2× display, while smaller layouts have smaller candidates available. The enlarged view is sized independently of the article width. These benefits apply to SDR photographs as well as gain-mapped HDR images.

What did the resolution comparison teach us?

The most obvious difference in my viewing was receiving enough image pixels for a high-resolution monitor. My initial Q50 trial stopped at 2048 pixels, so fullscreen viewing on a 5K display made it look softer. After matching the size ladder through 5K, my assessment improved substantially.

Efficient delivery means choosing sufficient resolution for the viewing space as well as suitable compression. The aim is to avoid both unnecessary downloads and enlarging a small image beyond the detail it contains. Keeping private masters independent of delivery settings lets us continue refining that balance.

This includes Retina phones, not just large desktop displays. In these tests, sufficient pixel resolution with stronger compression was preferable to enlarging a smaller image encoded at a higher quality setting.

Does storing all these different sizes mean I need more storage?

Not necessarily. The useful comparison is the total bytes stored against a defined alternative, rather than the number of files. An early study provides a concrete example: all 168 Q50 delivery files, covering 12 sizes per photograph, occupied 32.47 MB together. That is less than the 36.39 MB used by just the fourteen largest 5K Q70 files.

Those sizes give us flexibility to match the viewing space and display density. Visitors need only download the suitable version, with a larger image available when they choose to inspect it. This reduces unnecessary page bloat: visitors should not have to download image data that their current view does not need. Across phones, tablets and desktops, selecting suitable files can significantly reduce average page weight compared with sending everyone one large compromise version.

Does this point the way towards an optimum web architecture?

Yes, I think it points towards a very promising direction: websites that are quick and economical to browse, yet can reveal high-quality photographs and greater detail when a visitor wants them. The aim is to minimise unnecessary page weight while making the most of each device and display.

This starts with the page itself. Moving away from a heavy page builder towards a simple theme and Gutenberg gives us an opportunity to reduce unnecessary layout code, styling and scripts. My image delivery work complements that approach by addressing the photographs themselves: their compression, dimensions and the point at which larger versions are downloaded.

The page initially provides an image suited to its displayed size and the screen’s pixel density. A reader who wants a closer look can click to open a larger view on the same page, with an appropriate higher-resolution file delivered at that point. High-quality viewing remains available without requiring every visitor to download the largest image merely to read an article.

Behind this, I retain the photographic masters and automate the preparation of delivery files, including resizing, output sharpening and encoding. The same prepared images can serve both galleries and ordinary web pages through the CDN. This gives me control over the photographic result and keeps image preparation separate from the website’s page-building system. It also leaves room to change delivery formats as browsers and codecs develop.

My experiments give me practical evidence for that direction: useful SDR and HDR presentation, attractive results at substantially smaller file sizes, and access to more detail without making every page carry the largest files. The benefits extend to ordinary SDR photography; HDR adds another opportunity within the same approach.

The vision is a simple, responsive website that delivers what the visitor needs for the current view, then offers more when requested. I can seek lower average page sizes and faster delivery while retaining a rich visual experience. These results suggest a strong basis for that architecture, with whole-page performance across more devices and connections providing the next test of how far the combined benefits can go.

Why approve the SDR image separately when I edit on an HDR monitor?

An attractive HDR view does not tell me whether the SDR version is the photograph I want other viewers to see. An HDR monitor can be used to assess both, but I deliberately check the SDR rendition separately rather than judging only the HDR display.

In my own editing, Camera Raw’s secondary SDR controls within an HDR edit have not offered the flexibility I get from finishing the SDR photograph independently. My workflow starts with the SDR edit, saves that approved master, then finishes and saves the HDR version with matching geometry. Neither appearance is an afterthought: the gain map is generated from the two approved versions.

This is a creative-control requirement, not a claim that every photographer using another workflow neglects SDR. It also does not promise mathematically lossless delivery: resizing and compression still affect viewing copies, and Instagram processes uploaded files. What I retain is control over the intended appearance of both inputs, without needing a paid Photoshop export plugin.

What about Instagram?

Instagram is now a working output of this system. The same album produces responsive AVIF for websites and Instagram-specific gain-map JPEGs. I am not recommending JPEG gain maps for universal website use: AVIF remains my preferred balance there. The Instagram JPEGs meet a different need, at my tested 2160 × 1440 size with output sharpening and a full-resolution colour map.

When uploading, select Original ratio and avoid Instagram cropping or edits. Check the finished post, since the upload preview may look SDR. Instagram still controls its processing and display; independently edited masters give us control over the input rather than a guarantee of unchanged pixels after upload.

This is a complete-workflow approach, not Greg Benz versus Mark Heath or JPEG versus AVIF! My result demonstrates a specific route: retain the two finished masters and automate several outputs without buying an additional export plugin. It is a working personal system, not yet a packaged product for everyone to install.

Technical references

[1] Android Developers, Ultra HDR Image Format v1.1. https://developer.android.com/media/platform/hdr-image-format

[2] WebKit, WebKit Features in Safari 17.0. https://webkit.org/blog/14445/webkit-features-in-safari-17-0/