ImageApr 7, 2026 · Updated Oct 14, 2026·5 min

Image Optimization for the Web

A complete image workflow, ordered by what saves the most: resizing, format, quality, then delivery. We measured which srcset file Chromium picks at three pixel densities and how far below the screen it starts fetching lazy-loaded images (2,500 px in our test).

Camera, digital, photography — illustrating Image Optimization for the Web
🖼️
Try the Image Compressor
Compress images with quality control — all client-side
→
DG
Derek Giordano
Designer & Developer
In this guide
01How Much of a Page Is Images02Fix Them in This Order03What the Browser Picks From srcset04Lazy Loading: How Far Ahead Chrome Fetches05Images and Core Web Vitals06A Repeatable Pipeline

How Much of a Page Is Images

HTTP Archive's 2024 Web Almanac put median image bytes at 1,054 KB on desktop homepages and 900 KB on mobile ones, more than any other resource type on homepages, and at 442 KB and 348 KB on inner pages. That makes images the first place to look on most sites, but not because of any single ranking rule: Google's page experience documentation says there is no single page experience signal, and fast pages matter first to the people waiting for them.

Fix Them in This Order

Each step below was measured in one of our guides; the links go to the full tests.

What the Browser Picks From srcset

With srcset and sizes, the browser chooses the file; the HTML only offers candidates. We gave Chromium 141 five widths (400, 800, 1,200, 1,600 and 2,400 px) for a full-width image and recorded the file it loaded:

ViewportPixel densityPixels neededFile loaded
390 px1×390400w
390 px2×780800w
390 px3×1,1701,200w
1,440 px1×1,4401,600w
1,440 px2×2,8802,400w (the largest offered)

In every case it took the smallest candidate at least as wide as the slot times the pixel density, and the largest candidate when none was wide enough. Two practical consequences: a set like 400, 800, 1,200, 1,600 and 2,400 covers phones at 1× to 3× and most desktops; and sizes has to describe the real slot. If an image fills half the screen on desktop but sizes says 100vw, the browser downloads a file twice as wide as needed; sizes="(min-width: 1024px) 50vw, 100vw" fixes that.

Lazy Loading: How Far Ahead Chrome Fetches

We placed loading="lazy" images at set distances below the first screen and recorded which ones Chromium requested while the page loaded. At both 390 × 844 and 1,440 × 900, every image up to 2,500 px below the viewport was fetched straight away; those at 3,000 and 4,000 px waited for scrolling. That matches the thresholds Chrome's team documented on web.dev in 2020: 1,250 px on fast (4G) connections and 2,500 px on 3G or slower; our test machine reported no connection type, which landed on the 2,500 px value.

So on a short or medium page, lazy loading changes little: most images are close enough to load with the page anyway. It pays off on long pages with many images, such as galleries and feeds. What it must never touch is the main image at the top of the page, which is usually the Largest Contentful Paint element; lazy-loading it delays the very paint the metric measures. Browser support is broad: MDN's compatibility data lists loading in Chrome 77, Firefox 75 and Safari 15.4.

Images and Core Web Vitals

A Repeatable Pipeline

A setup that holds up for most sites: export each image at 400, 800, 1,200, 1,600 and 2,400 px wide (skipping sizes larger than the original), encode photos as AVIF and WebP with a JPEG fallback in a <picture> element, keep graphics as SVG or PNG, write width, height and a real sizes on every image, and lazy-load everything except the first screen.

Our browser tools cover the manual version: the Bulk Image Resizer makes the widths with a Lanczos filter and never enlarges a smaller image, the Image Compressor converts to WebP without handing back a larger file, and the Image Converter checks every output's file signature before you download it.

DG
Derek Giordano
Written by the creator of Ultimate Design Tools. BA in Business Marketing.
⚡ Try the free Image Upscaler →