Step 1: Export the image at the size it's shown
Export each image at the width of its box, or twice that for sharp phone and laptop screens. A phone photo can be 4,000 pixels wide; in a 600-pixel column that's more than six times too wide. A compressor can't fix that: the browser still downloads every pixel. PageSpeed Insights names images bigger than shown under "Improve image delivery" (older reports say "Properly size images").
Phones need a smaller file: srcset and sizes, or <picture>, let the browser pick it. WordPress writes them for you (since version 4.4), and so do most CMSs and image CDNs. max-width: 100% in the CSS only shrinks the picture on screen; the visitor still downloads the whole file.
Step 2: Pick the format
For photos use WebP, for logos and icons SVG; the table has the rest.
| Image | Use | Why |
|---|---|---|
| Photo, product photo, hero | WebP (AVIF if your CMS or CDN makes it) | WebP is 25 to 34% smaller than a comparable JPEG |
| Logo, icon, simple illustration | SVG | sharp at every size, usually a few KB |
| Screenshot, image with text or transparency | PNG, or lossless WebP | lossless WebP is 26% smaller than PNG |
| Animation | a short MP4 or WebM video | a 3.7 MB GIF became a 551 KB MP4 in web.dev's test |
WebP works in every current browser; caniuse puts it at 97% of users (October 2026). AVIF is smaller still and reaches 96%: serve it through <picture> with a WebP or JPEG fallback, or let your CMS or CDN choose.
Google names no format that ranks better: Google Images indexes WebP, AVIF and SVG like any JPEG, so what you win is speed.
Step 3: Compress it
Lower a photo's quality until you see a difference at the shown size, then go one step back. Strip the metadata too: camera, date and often the GPS location travel with every download. That costs bytes, and it tells anyone where you took the photo. Squoosh does one image free in your browser ("Images never leave your device"); on upload, the CMS or a plugin like Smush or ShortPixel does the rest.
Step 4: Put width and height in the HTML
With width and height on the <img> tag, the browser reserves the box before the file arrives, so your text doesn't jump when it lands. That jump is layout shift, which Google measures as CLS. Add height: auto in the CSS and the image still scales on a phone; CSS aspect-ratio does the same job. The 2025 Web Almanac counts 62% of mobile pages missing them on at least one image.
MarketingTracer's SEO audit lists "Images without width and height", "Images larger than needed" and "Images below the fold without loading="lazy"" with the pages the scan found them on, most Google clicks first when Search Console is connected. "Copy as task" hands an issue to your developer; "Scan again" says "Now fine" when the fix is live. It reads HTML attributes, so an image the stylesheet already sizes still lands on the list. Its speed timings are a lab test.

Demo account, sample data.
Alt text goes on the same tag and has its own page.
Step 5: Lazy-load below the first screen, never the top image
Put loading="lazy" on images below the first screen, so the browser fetches them as the visitor scrolls near. Every major browser supports it, and WordPress adds it by default.
Photos in a closed tab count as below the first screen too. A webshop for natural stone has a closed "related products" tab under each product. On 33 of its 66 product pages it holds the same 70 photos, 7.6 MB, and the browser downloads them all as the page opens. I tested one of those pages as a phone on slow 4G, five runs each way: it took 62.8 seconds to finish loading 9.2 MB. With the tab's photos blocked, 20.7 seconds and 1.7 MB. The top photo showed just as fast both ways. Don't look only at the top photo. Whatever the visitor doesn't see, the browser shouldn't load either: that tab is 7.6 MB for nothing.
The fix sits in the template. First load the tab's photos lazily, or when someone opens the tab: the shop's German sister site, same template plus a lazy-load plugin, fetches under 1 MB of images. Then make them lighter: they're mostly JPEG and PNG. As WebP they'd come to 4.2 MB at the same 600 pixels, or about 2 MB at 400, my estimate from re-encoding all 70.
Leave loading="lazy" off the top image. It's usually your LCP element, and lazy-loading it makes the browser wait: "Don't lazy-load images that are likely to be in-viewport when the page loads, especially LCP images," says Google's web.dev.
On a blog or category page, the first card's image can be the largest thing on screen, so leave loading="lazy" off the first card or two. WordPress 6.3 and later do this for you.
More on the top image: Largest Contentful Paint, and the developer's version on corewebvitals.io.
Measure the page before and after
Run PageSpeed Insights on one page before the fix and after it: look at "Improve image delivery" and which element it names as the LCP. That lab test shows the change at once; real-user data needs weeks of visits to catch up. Then run a crawl of your own site and compare its image lines with the last one.