Progressive Scan Responsive Images

Michael Walsh
By Michael WalshPublished

Current solutions to responsive images require web designers to create multiple versions of images to suit different device viewport sizes and pixel densities, but could there be a better way?

When I was looking at the current solutions and proposals for handling responsive images I started thinking about how we’d implement them in practice. The thought of having to resize all the images on a website multiple times for various device viewport sizes and pixel densities fills me with dread. So we’d likely lean on our Gruntjs build script to automate the resizing of images into the various dimensions needed.

The main problem in my opinion comes with user-generated images, so when our customers are using a content management system to add images to a website. We’d then need an automated process server-side to handle those images and spit out the necessary HTML. Although completely possible it’s something I’d prefer to avoid if at all possible.

Is there a better way?

We need a solution that is simple and straightforward for clients and web designers but also works as a responsive image. Perhaps the existing progressive scan JPEG format could come to the rescue? Images would be saved in progressive JPEG format at the highest resolution available (within limits of course). The image is saved in perhaps 10 scans so a mobile device might download just 3 scans of the image but a higher bandwidth desktop device would download all 10 scans of the image.

It should be possible to implement this approach today using the byte range HTTP header, that would allow a user agent to download only a certain portion of the entire image file. The image file would need to contain some meta data to inform browsers as to the byte ranges that correspond with the progressive scans.  Although less desirable a server-side solution is also feasible, as the number of scans sent to the client could be varied based on a Client Hints header (a proposal from Google) sent by the user agent. Both options could be cache friendly by using a Vary: Range or Vary: CH header respectively.

This JPEG progressive scan approach to responsive images has several bonus side-effects:

  1. The number of bytes downloaded of each image is determined by the device itself rather than by the web designer/developer of the particular website. So it’s much more future proof as the capabilities of devices change over time.
  2. The device is able to vary the filesize of the images downloaded at will. So for example if I was roaming on my mobile device it could download just 2 scans of the full progressive image but if I then switched to a fast Wi-fi connection it could then download all 10 scans.
  3. In the example above where the device has swapped from a low to high bandwidth connection it could download just the additional bytes of the image it needs (using the byte range HTTP header) rather than needing to download the image all over again, saving server bandwidth over other solutions.
  4. Browser vendors could also use any idle time once a page has loaded to improve image quality by downloading further scans of larger images.
  5. Browser vendors could intelligently manage the fidelity of images depending on their size in the page, so if an image was actually larger on mobile than in the desktop layout rather than needing the front-end developer to link to different files and include media queries the browser can handle this and download more progressive scans as and when required.
  6. We could say goodbye to thumbnail images!

Of course I could probably list as many issues with this approach if I put my mind to it but it certainly seems to have sufficient potential to investigate further. I should clarify that I don’t see this replacing a solution like Florian’s Compromise as there are instances when a resized version of an image just won’t do, such as when a logo would be illegible at a much smaller size.

Further Reading

I’m not the only person to notice the potential of progressive scan JPEGs for responsive images:

We use cookies to make this website work, to understand how it's used, and to measure our advertising. Find out more about cookies.

Cookie preferences

make an enquiry

Quick form · 3 steps · 1 min

How can we help?

I am looking for

Website

New marketing website, microsite or redesign

E-commerce

Shopify store, new or rebuilt

Web application From £10,000 + VAT

Bespoke software and internal tools

AI implementation From £10,000 + VAT

Practical AI in your existing systems

Data visualisation From £10,000 + VAT

Dashboards and data pipelines

Migrations, hosting & support

Website migrations, web hosting and ongoing support

Something else / not sure yet

Let's talk it through

Prefer to talk?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Step 1 of 3

We'll be in touch within one business day to discuss your project. In the meantime, feel free to drop us a line at hello@enovate.co.uk if anything else comes up.

book directly

Book a call with Michael

Michael Walsh, Founder & Managing Director. Pick a time that suits you, add your name and email, and the calendar invitation is yours.

Loading available times…

You can still book through the full calendar, or send us a message.

Times shown in . The calendar invitation lands in your inbox the moment you confirm.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Booking is handled by Calendly; see our privacy policy.

You're booked in

(). The calendar invitation is on its way to .

RescheduleCancel