Home / Blog / Performance

The image pipeline most WordPress sites are missing

Uploading a 4 MB photo and letting the theme resize it is the most common cause of a slow site. What to do at upload, at render, and at the edge.

On most slow WordPress sites I audit, images are the single biggest problem. Not because anyone did something wrong — just because nobody set up a pipeline. Here's the one I use, in three stages.

Stage 1: at upload

  • Cap the original size. Automatically resize anything over ~2560px wide. Nobody needs a 6000px original on a website.
  • Compress on upload. Lossy compression at sensible quality is invisible to visitors.
  • Generate modern formats. Create WebP (and AVIF where supported) versions alongside the JPEG.
  • Clean up image sizes. Themes and plugins register lots of sizes. Remove the ones you don't use so uploads stay fast and storage stays small.

Stage 2: at render

  • Always output srcset and sizes so phones download phone-sized images.
  • Always set width and height to prevent layout shift.
  • Lazy-load everything below the fold — but not the hero image.
  • Give the hero fetchpriority="high".
  • Use CSS for decorative effects instead of exporting them into images.

Stage 3: at the edge

A CDN serves images from a server close to the visitor and caches them for a long time. Many CDNs can also convert formats and resize on the fly, which removes work from your server entirely.

What about images already on the site?

Bulk-optimise the media library, regenerate thumbnails for the sizes you kept, and replace any images that were inserted at full size in old posts.

Fix images once, at the pipeline level, and every future upload is fast by default.
Chat on WhatsApp