Images are usually the heaviest part of a WordPress page, which makes them the most effective thing to fix when your site feels slow. The good news is that most of the work is a one-time setup: get your image sizes right, compress before you upload, use modern formats, and let lazy loading do its job. Here’s a practical order of operations.
Want to try it yourself? Compress your images free — no upload, no signup.
Table of Contents
Why Images Slow WordPress Down
A single uncompressed phone photo can weigh several megabytes. Upload a handful of those into a blog post and the page can easily top 10MB, which hurts your Largest Contentful Paint and your visitors’ patience, especially on mobile connections. Image problems also feed directly into your Core Web Vitals and your overall PageSpeed score.
WordPress Image Optimization in 11 Steps
Step 1: Resize Before You Upload
The most common WordPress image mistake is uploading a 6000-pixel-wide photo to display at 800 pixels. WordPress will create smaller copies, but it still stores the giant original, and it can end up serving more data than the page needs.
Resize images to the largest size they will actually display at. For a standard blog layout, that is often between 1200 and 1600 pixels wide, depending on your theme, and up to about 1920 pixels for full-width banners. Our guide to how much a website image should weigh gives practical targets.
When you resize, keep the proportions locked so nothing stretches. See how to resize an image without distorting it.
Step 2: Compress Before You Upload
Compression is where the biggest savings come from. A well-compressed JPG or WebP can be a small fraction of the size of the original with no visible difference at normal viewing size. Our guide on compressing images without losing quality explains how to pick a quality setting.
Compressing and resizing on your own device before uploading has a few advantages over relying on a plugin to fix things afterward:
- Your server stores smaller files, so your media library stays lean.
- You don’t depend on a plugin’s monthly quota or on a third-party server.
- You choose the quality level yourself instead of accepting a default.
For many images at once, see how to batch resize images for free.
Step 3: Choose the Right Format
- JPG for photographs.
- PNG for graphics that need crisp edges or transparency, though WebP is often smaller.
- WebP is widely supported and generally smaller than JPG and PNG. WordPress has supported WebP uploads since version 5.8.
- AVIF can be smaller still, and WordPress has supported AVIF uploads since version 6.5, provided your host’s server software supports it. See our AVIF explainer for the trade-offs.
- SVG for logos and icons, with caution about uploading untrusted SVG files. See SVG explained.
For help choosing, see JPG vs PNG vs WebP.
Is PNG or JPEG better for WordPress? Neither is better everywhere. Use JPG for photographs, because it produces much smaller files. Use PNG for logos, screenshots, graphics with text and anything that needs transparency. If you can, WebP often beats both.
Step 4: Understand What WordPress Does Automatically
WordPress already helps in several ways:
- Multiple image sizes. When you upload an image, WordPress generates several smaller versions (thumbnail, medium, large and so on).
- Responsive images. WordPress adds
srcsetandsizesattributes automatically so browsers can pick an appropriately sized version. See our responsive images and srcset guide. - Big image scaling. Very large uploads are scaled down to a maximum dimension (2560 pixels by default) to prevent enormous files.
- Lazy loading. WordPress adds
loading="lazy"to images by default. Learn more in our lazy loading guide.
These features are helpful, but they do not replace compressing your files. WordPress re-encoding an oversized photo is not the same as starting from a properly sized, well-compressed image.
Step 5: Don’t Lazy Load Your Hero Image
Lazy loading everything sounds sensible, but delaying the main image at the top of the page makes it appear later and can hurt your LCP score. Keep the first, largest image eager (the default behavior for most themes and plugins handles the featured image well) and lazy load the rest. If your LCP is poor, check this first.
Step 6: Strip EXIF Metadata
Camera and phone photos carry hidden data: the camera model, timestamps, and sometimes GPS coordinates. Removing it shaves a few extra kilobytes off each file without changing how the image looks, and it also protects your privacy, since a photo taken at home can reveal where you live. Most optimization plugins can strip metadata, and re-saving or compressing an image in a browser tool usually drops it too.
Step 7: Choose an Image Optimization Plugin (Optional)
If you have a big library of existing images, or you want conversions to happen automatically on upload, a plugin can do the work for you. Plugins are a good safety net, but they work best when you already upload sensibly sized files.
| Plugin | How it works | Worth knowing |
|---|---|---|
| Imagify | Cloud compression, WebP/AVIF conversion | Free plan has a monthly optimization quota |
| EWWW Image Optimizer | Can compress on your own server, converts to WebP, includes lazy loading | Local optimization has no monthly quota, but uses your server’s resources |
| ShortPixel | Cloud compression with smart cropping and HEIC support | Credit-based pricing |
| Optimole | Serves images through a CDN, resized to each visitor’s screen | Ongoing service rather than a one-time fix |
| WP-Optimize | All-in-one cleanup, caching, and image compression plugin | Has a free version and a paid premium version, so check which features you need |
| Image Optimizer by Elementor | Background compression inside the Elementor ecosystem | Best if you already build with Elementor |
Plans, quotas, and free-tier limits change often, so check each plugin’s current page before you commit. If your host runs LiteSpeed and you already use LiteSpeed Cache, its Image Optimization tab can also handle WebP and AVIF conversion, so you may not need a separate plugin.
What is the best image optimizer for WordPress? It depends on your setup. Pick based on whether you want server-side or cloud processing, how many images you have, whether you need a free option, and whether you already use a plugin that covers images. Avoid running two image optimizers at the same time, because they can conflict.
Step 8: Use a CDN for Faster Delivery
A content delivery network (CDN) such as Cloudflare or Bunny stores copies of your optimized images on servers around the world and delivers them from the location closest to each visitor. It does not make files smaller, but it reduces the distance data has to travel, which helps visitors far from your hosting server. Add it after you have optimized the files themselves.
Step 9: Add Caching
A caching plugin such as LiteSpeed Cache (if your host runs LiteSpeed) can handle lazy loading, WebP/AVIF conversion and delivery. Remember to purge the cache after changing image settings and test in a private window so you aren’t looking at an old cached version.
Step 10: Don’t Forget Alt Text and File Names
Optimization isn’t only about weight. Descriptive file names (red-running-shoes.jpg rather than IMG_4821.jpg) and meaningful alt text help accessibility and image search. Write alt text that describes what the image shows, not a list of keywords.
Step 11: Audit What’s Already There
If your site has been running a while, you probably have oversized images already in your library. Our guide to auditing oversized images shows how to find the biggest offenders, and a store owner should also read optimizing ecommerce product images.
A Simple WordPress Image Checklist
- Resize to the largest displayed width (often 1200-1600px)
- Compress to a sensible quality, then check it visually
- Use JPG or WebP for photos, with PNG or SVG where needed
- Give files descriptive names and write real alt text
- Keep lazy loading on, except for the top image
- Strip EXIF metadata
- Use a caching plugin (and optionally a CDN), and purge the cache after changes
- Re-check your PageSpeed results afterwards
Frequently Asked Questions
What is the best image size for WordPress?
It depends on your theme’s content width, but 1200-1600 pixels wide covers most blog layouts. Anything much larger is wasted bandwidth unless you have a full-width design.
Does WordPress compress images automatically?
WordPress re-encodes images when it creates resized copies, but it does not do serious optimization for you. Compress and resize before uploading, or use an optimization plugin as a backup.
Should I use WebP in WordPress?
Yes, in most cases. WebP is widely supported and generally smaller than JPG and PNG at similar quality. Keep a JPG fallback in mind if you worry about very old browsers.
Is WP-Optimize free?
WP-Optimize offers a free version and a paid premium version. The free version covers the basics of database cleanup, caching and image compression, while some advanced features need a paid plan. Check the plugin’s current listing for what each tier includes.
Is WP-Optimize good?
It’s a well-known all-in-one plugin, and it works well if you want cleanup, caching and image compression in a single tool. If you only need image optimization, a dedicated image plugin or a LiteSpeed Cache setup may be simpler. Whatever you choose, avoid running overlapping plugins that do the same job.
Is PNG or JPEG better for WordPress?
Use JPG for photos, since it gives much smaller files, and PNG for logos, screenshots and anything that needs transparency. WebP is often smaller than both.
Do I need an image optimization plugin?
Not necessarily. If you resize and compress before uploading and your theme handles lazy loading, you may not need one. A plugin helps with bulk conversion and automatic WebP delivery.
Resize and compress your images before they ever reach your media library, free and instantly, with our browser-based tool — no upload required; everything happens on your device.

