This guide covers “optimize images for wordpress” in plain language. Images are usually the heaviest part of a web page. Optimizing them is one of the easiest ways to speed up WordPress, improve Core Web Vitals and help SEO. Follow these steps.
1. Resize before you upload
A photo straight from a phone can be 4000 pixels wide, but your layout may only show it at 1200. Resize images to roughly the largest size they will display. Typical content width limits are around 1200 to 2000 pixels.
2. Choose the right format
| Format | Best for |
|---|---|
| WebP | Most photos and graphics, good compression |
| AVIF | Even smaller files, where supported |
| JPEG | Photos when WebP is not an option |
| PNG | Images needing transparency |
| SVG | Logos and icons |
3. Compress
Use a compression tool or plugin to reduce file size with little visible quality loss. Aim for hero images under a few hundred KB and most others far smaller.
4. Lazy-load below the fold
Lazy loading delays off-screen images until needed. WordPress does this by default for many images. Do not lazy-load your main above-the-fold image, since that hurts LCP. See how to fix LCP.
5. Set width and height
Include dimensions so the browser reserves space and the layout does not jump. See fixing CLS.
6. Use responsive images
WordPress generates multiple sizes and uses srcset so phones download smaller files.
7. Name files and write alt text
- Use descriptive names:
blue-ceramic-vase.webp, notIMG_4021.webp. - Write short alt text describing the image for accessibility and SEO.
8. Use a CDN
A CDN delivers images from servers near your visitors.
Quick checklist
- Resize to display size.
- Convert to WebP.
- Compress.
- Add alt text and dimensions.
- Lazy-load everything except the hero.
More: how to speed up WordPress.
Optimize images for WordPress FAQ
Does image size affect SEO?
Yes, through page speed and Core Web Vitals.
Should I use a plugin?
Plugins automate compression and conversion, but optimizing before upload also helps.