1. Home
  2. Guides
  3. Image Optimization for WordPress: A Practical Guide

Image optimization for WordPress

Updated November 20, 2026

Images are usually the heaviest part of a WordPress page. A few habits applied before you upload matter more than any plugin installed afterwards.

The short answer

Resize the image to the width it will actually be displayed, compress it, and upload it as WebP or a well-compressed JPG. Doing this before the upload keeps your media library light, and no plugin can fully undo an oversized original.

What WordPress does with your upload

When you upload an image, WordPress keeps the original and generates several smaller copies (thumbnail, medium, large and sizes added by your theme). Since version 5.3, images larger than 2560 pixels on their longest side are also scaled down automatically, and the original is kept on the server. Since version 5.5, images get loading="lazy" by default, and WordPress writes a srcset attribute so browsers choose the copy that fits their screen.

This is useful, but it has limits. The copies are generated from whatever you uploaded: a 6 MB original produces larger copies than a 600 KB one, and the original keeps taking disk space. It also does not choose a better format for you.

Before you upload: a four-step routine

  1. Find the display width. Look at your theme's content column. Many themes show posts in a column between 700 and 1000 pixels wide.
  2. Resize. Aim for about twice that width at most (for example 1600 pixels for an 800-pixel column), so the image stays sharp on high-density screens. Use Resize image.
  3. Compress. With Compress image, a quality of 75 to 85% is rarely distinguishable from the original on photos.
  4. Choose the format. Use WebP for most photos and graphics (Convert to WebP). Keep PNG for images that need exact edges, such as screenshots with small text, and for logos when SVG is not available.

Rough target sizes

Type of imageTypical widthReasonable weight
Photo inside an article1200 to 1600 px80 to 250 KB
Full-width hero or header1920 to 2400 px150 to 400 KB
Product photo1000 to 1500 px60 to 200 KB
LogoAs displayed, ×2Under 30 KB (SVG if possible)

These are practical guidelines, not rules: a detailed landscape needs more bytes than a flat illustration.

WebP in WordPress

WordPress has accepted WebP uploads since version 5.8, and AVIF uploads since 6.5. Current browsers display both. Upload the WebP file directly: you do not need a plugin to serve it. A plugin that converts every image on the fly can help on a large existing library, but for a new site the manual routine above is simpler and gives you control over the quality.

Lazy loading, and one exception

Lazy loading delays images that are far below the visible area, which saves bandwidth. The image at the very top of the page (the one that appears first, often called the LCP element) should not be lazy-loaded, because it delays what the visitor sees first. Recent WordPress versions try to detect this, but check your theme: if your header image carries loading="lazy", remove it. See our guide on images and Core Web Vitals.

Common mistakes

  • Uploading straight from a camera or phone. A 12-megapixel photo displayed in an 800-pixel column wastes more than 90% of its pixels.
  • Stacking optimization plugins. Two plugins compressing the same file can degrade it twice. Keep one at most.
  • Forgetting the alt text. It helps accessibility and gives search engines context. Describe the image in a short sentence, and leave it empty for purely decorative images.
  • Leaving private metadata in photos. Photos can contain GPS coordinates. Remove them first, as explained in the EXIF guide.
  • Using a huge image as a thumbnail. Crop to the right ratio with Crop image instead of letting the theme shrink the whole picture.

Checking the result

Open a page, then your browser's developer tools (Network tab, filtered on images) and look at the size of each file. If a single image weighs more than 300 KB in an article, it is worth a second look. Our tools run in your browser, so your images are not sent to a server while you prepare them.

Tools for this

More guides