How to Optimize Images for WordPress (Speed, Plugins & Core Web Vitals)
Why WordPress Images Get Heavy
WordPress runs a large share of the web, and slow WordPress sites are slow for one reason more than any other: oversized images. The platform makes it easy to upload a photo straight from your phone or camera and drop it into a post — and that photo is often 4000 pixels wide and several megabytes, displayed in a content column that's maybe 700 pixels across. You're shipping five times the pixels anyone sees.
WordPress does generate smaller "thumbnail" sizes when you upload, and a good theme will serve an appropriately sized version through the `srcset` attribute. But two things still go wrong. First, WordPress does not meaningfully compress your original — it keeps a full-size copy and serves it in lightboxes and zoom views. Second, themes vary wildly in how well they use the generated sizes. The result is pages that carry far more image weight than they need.
The Before-Upload Workflow
The highest-leverage habit is fixing images before they ever reach the Media Library, because once a bloated original is uploaded, every generated size is derived from it and the full-size copy is still served somewhere.
Two steps, in order:
1. Resize to a sensible maximum. Almost no WordPress content area is wider than about 1200–1600 px. Resize the longest side to 1600 px before upload and you remove most of the weight instantly, with no visible loss in the post. 2. Compress. Run the resized image through a compressor at quality 80–82 for photos. A 4 MB camera photo typically lands around 200–300 KB after resize and compression — a 90%-plus reduction that looks identical in the post.
Doing this before upload means the original WordPress stores is already lean, so every thumbnail size it generates is lean too, and the lightbox version is reasonable. The compressor for WordPress images runs this resize-and-compress step in your browser before you upload.
When a Plugin Helps (and When It Doesn't)
Optimization plugins — the well-known image-optimizer plugins for WordPress — are genuinely useful in two situations: when you already have hundreds or thousands of images uploaded and can't reprocess them by hand, and when multiple people add images to the site and you can't rely on everyone compressing first. A plugin can compress on upload and bulk-optimize the existing library automatically.
What a plugin can't do is undo a bad source. If the uploaded original is a 6 MB, 5000-pixel image, the plugin compresses it but the underlying dimensions are still wrong unless the plugin also resizes (some do, some don't). The cleanest setup is both: compress before upload for control, and run a plugin as a safety net for anything that slips through or was uploaded before you tightened the process.
One caution: some plugins offload compression to their own servers, which means your images pass through a third party. If that matters for your content, prefer a plugin that compresses locally on your server, or simply compress before upload using a tool that runs in your browser so nothing leaves your machine.
Pick the Right Format in WordPress
WordPress has supported WebP uploads since version 5.8, and many hosts and plugins can serve WebP automatically with a JPEG fallback. WebP is the best default for photographic content on a WordPress site — typically 25–30% smaller than JPEG at the same quality.
The format rules are the same as anywhere:
- Photographs and complex images: JPEG (MozJPEG) or WebP.
- Logos, icons, screenshots, and anything with sharp text: PNG, or lossless WebP.
- Avoid PNG for photos — it produces files many times larger with no visible benefit.
If your theme or a plugin supports serving WebP with a JPEG fallback, use it. Visitors on modern browsers get the smaller WebP; the rare older client gets the JPEG. For the full comparison, see JPEG vs PNG vs WebP.
Images and Core Web Vitals
Google's Core Web Vitals are part of how it ranks pages, and images are tangled up in two of the three metrics.
Largest Contentful Paint (LCP) measures how long the biggest visible element takes to render — and on most pages that element is an image, usually the hero or featured image. A heavy, slow-loading hero image is the most common cause of a poor LCP score. Compressing and correctly sizing that one image often does more for the score than any other single change. It also helps to let WordPress mark above-the-fold images as high priority rather than lazy-loading them.
Cumulative Layout Shift (CLS) measures unexpected movement as the page loads. Images that don't declare their dimensions cause the content below them to jump when they finally load. WordPress adds width and height attributes automatically in recent versions, which reserves the space and prevents the shift — another reason to keep the platform and theme current.
A Worked Example: One Blog Post
A typical post: one featured image and four inline photos, each uploaded straight from a phone at 4032×3024 and roughly 3.8 MB. Total image weight on that page: about 19 MB before WordPress's thumbnail handling, and the full-size versions still load in the lightbox.
Now apply the workflow — resize each to 1600 px and compress at quality 80:
- Featured image: about 240 KB (WebP: about 170 KB).
- Four inline photos: about 220 KB each, roughly 880 KB total (WebP: about 620 KB).
The page's image payload drops from ~19 MB to about 1.1 MB — a 94% reduction — and nothing in the post looks any different. That's typically the difference between a failing LCP score and a passing one.
Common Misunderstandings
- "WordPress optimizes images for me." It generates resized variants but does not compress your original meaningfully. The full-size file you upload is what gets served in zoom and lightbox views.
- "A plugin replaces compressing before upload." A plugin helps at scale and as a safety net, but it can't fix wrong source dimensions unless it also resizes, and some route your images through a third-party server. Compressing first gives you control.
- "Lazy loading fixes everything." Lazy loading helps below-the-fold images, but lazy-loading your hero image actually hurts LCP, because it delays the very element the metric measures. Keep above-the-fold images eager.
Frequently Asked Questions
Q: Should I compress images before uploading or use a plugin?
Compressing before upload gives the best control and the leanest source. A plugin is valuable for bulk-optimizing an existing library and catching images other contributors add. The strongest setup uses both. See how image compression works for why pre-compression produces predictable results.
Q: Does WordPress convert my images to WebP automatically?
Not by default for serving, though it accepts WebP uploads. Automatic WebP delivery with a JPEG fallback usually comes from your host, a CDN, or an optimization plugin. Once enabled, it's one of the easiest big wins available.
Q: What image size should I upload to WordPress?
Resize the longest side to around 1600 px for full-width content, less for smaller layouts. That covers every common content width and lightbox without shipping pixels nobody sees.
Q: Will optimizing images really improve my Google ranking?
Indirectly but meaningfully. Image weight is the most common cause of a poor LCP score, and Core Web Vitals are a ranking factor. Faster pages also keep more visitors. Compressing images is one of the highest-return changes you can make to a WordPress site.
Ready to compress your images?
Open Compressor