How to Optimize Images for WordPress (Size, Format and Lazy Loading)

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, not IMG_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

  1. Resize to display size.
  2. Convert to WebP.
  3. Compress.
  4. Add alt text and dimensions.
  5. 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.

Related reading

Keep reading

Comparisons

Squarespace vs WordPress: Which Should You Choose in 2026?

Squarespace vs WordPress compared on ease of use, design, cost, SEO, ownership and growth, with clear advice on which fits your project.

Comparisons

Tuli Builder vs Bricks vs Breakdance: Which Works Best With AI?

Tuli Builder vs Bricks vs Breakdance compared for AI: storage format, pasting HTML, built-in AI, MCP support, dynamic data, WooCommerce and pricing model.

Tutorials

How to Create a Towing Company Website With AI (Step-by-Step Guide)

Build a towing company website with AI: 24/7 dispatch call buttons, service types, coverage areas, pricing transparency and local SEO.

Tutorials

How to Optimize Images for WordPress (Size, Format and Lazy Loading)

How to optimize images for WordPress: right sizes, modern formats like WebP, compression, lazy loading and alt text, step by step.

Tutorials

How to Create a Fence Company Website With AI (Step-by-Step Guide)

Build a fence installation company website with AI: fence type pages, project galleries, estimate forms, permits info and local SEO.

Tutorials

How to Back Up a WordPress Site (Manual and Automatic Methods)

How to back up a WordPress site: what to back up, host backups vs plugins vs manual, how often to do it and how to restore.

Browse by topic: Tutorials · Comparisons · AI Website Building · Website guides by industry