---
title: "How we improved image download sizes on Medium with just four characters"
description: "Image-heavy websites need browsers to choose efficient image variants, but srcset and sizes can require complex breakpoint rules for responsive layouts. The post distinguishes picture, which lets authors prescribe sources based on conditions, from srcset, which gives browsers candidate dimensions and lets them choose using context such as connectivity and cache state. It explains that browsers begin fetching images before layout is rendered, while lazy-loaded images can defer fetching until their dimensions are known. With WebKit's March 24, 2026 support for auto in sizes on lazy-loaded images, the recommendation is to prepend auto to those sizes attributes; unsupported browsers ignore the unparseable rule. On Medium, the change made the home feed's image-related download chunk about 7% smaller on a small, but not mobile-small, display, and the text says WordPress updated every instance broadly."
---

# How we improved image download sizes on Medium with just four characters

[Medium](https://yomu.fyi/company/medium) · Scott Batson · May 18, 2026

**Type:** Explainer

## Summary

Image-heavy websites need browsers to choose efficient image variants, but srcset and sizes can require complex breakpoint rules for responsive layouts. The post distinguishes picture, which lets authors prescribe sources based on conditions, from srcset, which gives browsers candidate dimensions and lets them choose using context such as connectivity and cache state. It explains that browsers begin fetching images before layout is rendered, while lazy-loaded images can defer fetching until their dimensions are known. With WebKit's March 24, 2026 support for auto in sizes on lazy-loaded images, the recommendation is to prepend auto to those sizes attributes; unsupported browsers ignore the unparseable rule. On Medium, the change made the home feed's image-related download chunk about 7% smaller on a small, but not mobile-small, display, and the text says WordPress updated every instance broadly.

## Context

Websites commonly transfer substantial image data, while browsers begin fetching images before layout is rendered. Responsive-image markup can therefore require complex sizes breakpoint rules, especially for pages containing many unpredictable images such as avatars, post images, and sidebar assets.

## Approach / What changed

Add auto at the beginning of the sizes attribute for lazy-loaded images. The browser can then defer the request and choose an optimized image using layout, connectivity, and dimensions; browsers that do not support auto ignore the rule because sizes parsing already permits unrecognized rules to be ignored.

## Takeaways

- The picture element is intended for choosing different images based on conditions such as color scheme, screen dimensions, or file type, while srcset describes alternate dimensions of an otherwise identical image.
- The reported Medium change reduced the image-related download chunk for a home-feed view by about 7% on a small, but not mobile-small, display.
- The post says WordPress updated every instance of lazy-loaded images to support auto, relying on the existing sizes behavior to preserve compatibility in browsers that do not recognize it.

**Tags:** [Performance](https://yomu.fyi/topic/performance)

- Source: [Medium](https://medium.engineering/how-we-improved-image-download-sizes-on-medium-with-just-four-characters-9621b0ebb291)
- Source URL: https://medium.engineering/how-we-improved-image-download-sizes-on-medium-with-just-four-characters-9621b0ebb291
- Ingested by Yomu: 2026-09-09T16:03:49.276Z

[Read original post](https://medium.engineering/how-we-improved-image-download-sizes-on-medium-with-just-four-characters-9621b0ebb291)
