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

Tutorials

How to Create a Pest Control Website With AI (Step-by-Step Guide)

Build a pest control company website with AI: pest-specific service pages, safety info, recurring plans, emergency calls and local SEO.

Tutorials

How to Create a Wedding Planner Website With AI (Step-by-Step Guide)

Build a wedding planner website with AI: portfolio of real weddings, packages, inquiry forms, testimonials and local SEO.

Tutorials

How to Create an Accountant or CPA Website With AI (Step-by-Step Guide)

Build an accountant or CPA firm website with AI: services, tax-season messaging, secure document handling, trust signals and local SEO.

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.

AI Website Building

The Cheapest Way to Build a Website in 2026 (No Monthly Fees, Ever)

Discover the cheapest way to build a website in 2026 without the ads, lock-in, or monthly fees. We break down real costs and show a lean, owned stack you pay for once.

Tutorials

From ChatGPT to WordPress: Turn AI-Generated HTML Into a Real Site

Vibe-coded a site with ChatGPT or Claude? Here's how to go from ChatGPT to WordPress the right way — turning AI-generated HTML/CSS/JS into fully editable, dynamic WordPress pages.

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