Serve images efficiently
Images are most of the weight of most pages. Four changes fix most of it.
Images are the largest part of nearly every slow page, and the easiest to fix without touching code.
What the platform does
- Converts to WebP or AVIF at the edge when the browser supports it.
- Serves images from the CDN location nearest the visitor.
- Sets long cache lifetimes with content-based file names.
What you should do
- Upload at a sensible size
A full-width hero rarely needs more than 2000 pixels across. A 6000-pixel photo from a phone wastes bandwidth and processing on every request.
- Let WordPress make the sizes
Themes that ignore
srcsetsend desktop images to phones. Check the markup for asrcsetattribute. - Lazy load below the fold
WordPress does this by default. Exclude the hero image, because lazy loading it delays the largest paint.
- Pick the right format
Photographs as JPEG, flat graphics and screenshots as PNG, logos and icons as SVG.
Running one across a large library rewrites thousands of files and hammers the disk. Run it on staging, in batches, outside busy hours — or ask support to do it out of band.
