Send a smaller image to a smaller screen

Practice Author ยท

Download size and display size are different.

A photograph displayed at 400 pixels wide may still download as a 4000-pixel original. CSS width alone does not reduce that transfer.

Export smaller sources and let the browser choose with srcset and sizes. Keep width and height attributes so space is reserved before download.

Inspect the actual selected resource in developer tools at a fixed viewport and device pixel ratio. Compare bytes and appearance together.