How to Compress Images for WordPress (Before and After Upload)
Images are the #1 cause of slow WordPress sites. A single unoptimized hero image can add 3–4 seconds to your page load time and tank your Core Web Vitals score. This guide covers a simple before-upload workflow using JPEGMinify plus what to do with images already in your Media Library.
Why WordPress Doesn't Optimize Images for You
WordPress generates multiple sizes of every uploaded image (thumbnail, medium, large, full) but it does not compress the original. Plugins like ShortPixel, Imagify, and EWWW Image Optimizer add compression, but they either upload your images to their servers (privacy concern) or require a paid plan for high volume.
Pre-compressing with JPEGMinify before upload gives you fully private, free, unlimited compression — and all the WordPress thumbnails generated from your upload will also be smaller.
Recommended Image Sizes for WordPress
| Image Type | Recommended Width | Quality | Target Size |
|---|---|---|---|
| Hero / banner | 1920 px | 75–80% | 150–400 KB |
| Blog post feature image | 1200 px | 75% | 80–200 KB |
| Inline content images | 800–1000 px | 72–75% | 40–100 KB |
| Product images (WooCommerce) | 800 px | 80% | 50–120 KB |
| Thumbnail / card images | 400 px | 70% | 15–40 KB |
WordPress's default maximum image width is 2048 px. For most content, 1200 px is sufficient and loads significantly faster on mobile.
Step-by-Step: Pre-Upload Workflow
- Open JPEGMinify before you open the WordPress admin.
-
In Settings, set Max Width to match your content type (e.g.,
1200for blog images). - Set Quality to
75. - Drop all images you plan to upload. JPEGMinify processes them in parallel.
- Review the comparison slider for each image — check that text stays sharp and colors look accurate.
- Click Download All as ZIP, unzip, and upload the compressed files to WordPress Media Library.
This workflow takes about 30 seconds per batch and requires zero plugins or API keys.
Should You Also Use a WordPress Optimization Plugin?
Using JPEGMinify for pre-upload compression and a plugin for existing Media Library images is the best approach:
- Pre-upload (JPEGMinify): Free, unlimited, private. Best for new content.
- Plugin (ShortPixel / Imagify / EWWW): Retroactively optimizes existing uploads and auto-processes new uploads in the background. Best for established sites with large Media Libraries.
If you use a plugin, disable server-side optimization for images you've already compressed — re-compressing a JPEG degrades quality more than the first compression alone.
Serving WebP in WordPress
Modern WordPress (6.1+) with Imagify, ShortPixel, or Jetpack can serve WebP versions of images automatically. To get the benefits:
- Install a WebP plugin or enable WebP in your existing optimization plugin.
- The plugin generates
.webpversions of your existing JPEGs. - It injects
<picture>tags so supporting browsers get WebP, others get JPEG.
If you want to pre-generate WebP yourself, switch JPEGMinify's output to WebP in Settings
and upload the .webp file directly. WordPress 5.8+ accepts WebP uploads natively.
Core Web Vitals: LCP and Images
The Largest Contentful Paint (LCP) metric measures how fast the biggest visible element loads. For most WordPress pages, that element is the hero or featured image. Reducing it from 800 KB to 150 KB typically improves LCP by 1–2 seconds — often the difference between a "Good" and "Needs Improvement" score in Google Search Console.
Other tips to improve LCP:
- Add
fetchpriority="high"to your hero image tag - Add
loading="eager"to above-the-fold images (andloading="lazy"to the rest) - Add explicit
widthandheightattributes to prevent layout shift (CLS)