🔵 WordPress Image Guide
Compress Images for WordPress — Avoid Double-Compression & Optimize the Media Library
WordPress re-encodes every uploaded image at quality 82. If you're running an image compression plugin on top of that, you may be compressing already-compressed images — compounding quality loss without meaningful size savings. Here's how to do it right.
WordPress re-encodes at quality 82 by default
Pre-compress before upload to prevent double loss
Plugin comparison: Smush vs ShortPixel vs Imagify
WebP delivery setup guide
Free browser-based pre-compression tool
82%
WordPress default JPEG quality for re-encoding uploads
5–7
image copies WP creates from a single upload (thumbnails)
5.8+
WordPress version with native WebP media library support
100
free images/month on ShortPixel's free tier
Pre-Compress Before Uploading to WordPress
Compress at 78–80% quality before upload — then WP's quality 82 re-encode barely touches it.
What WordPress Does to Your Images When You Upload
WordPress doesn't just store the image you upload. When you add an image to the Media Library, WordPress automatically generates multiple resized versions called "image sizes" — thumbnail (150×150), medium (300px), medium_large (768px), and large (1024px) by default, plus any custom sizes your theme registers. That can be 5–7 copies of the image on your server from a single upload.
Each of those copies is re-encoded using PHP's GD library or Imagick at quality 82 (since WordPress 4.5, changed from 90). This means WordPress applies its own compression pass to every image on upload, regardless of what quality you uploaded.
The double-compression trap: If you upload a 3 MB original JPEG, WP re-encodes at quality 82 — one compression pass, result is clean. If you upload an already-compressed JPEG (say, from a compression plugin applied post-upload to an existing image), WP might re-encode a quality-82 image at quality 82 again — adding unnecessary generation loss. The safest workflow is to pre-compress once at 78–80% before uploading, then let WP do its single quality-82 pass. Two clean passes, not double-lossy cycles.
WordPress Image Compression Plugin Comparison
| Plugin | Free Tier | WebP | Compression Method | Best For |
| ShortPixel | 100 images/month | ✓ Auto-serve WebP | Server-side via ShortPixel API; lossy/lossless/glossy modes | Best quality/price ratio; AVIF support on paid plans |
| Smush | Unlimited (lossless) | ✓ WebP (Pro only) | Lossless optimization via WPMU Dev API; lossy requires Pro | Most popular; free lossless is genuinely useful for PNGs |
| Imagify | 25 MB/month | ✓ Auto-convert + serve | Server-side via Imagify API; Normal/Aggressive/Ultra modes | Aggressive compression; best for blogs with many images |
| Compress JPEG & PNG (TinyPNG) | 500 images/month | ✗ No WebP | TinyPNG/TinyJPG API (quality ~60) | Simple, reliable; WebP requires separate setup |
| Pre-compress + no plugin | Unlimited free | Manual or via Cloudflare | Browser-based before upload; WP does single clean pass | Small sites, developers, anyone on shared hosting limits |
How to Serve WebP Images in WordPress
WordPress 5.8+ supports WebP natively in the media library — you can upload WebP files directly and use them in posts. For automatic WebP delivery (serving WebP to browsers that support it while serving JPEG to those that don't), there are three main approaches:
Option 1: ShortPixel or Imagify plugin. These plugins create WebP versions of every uploaded image and use .htaccess rewrite rules to serve the WebP version automatically to supporting browsers — no template changes needed. The browser's Accept: image/webp header triggers the rewrite.
Option 2: Cloudflare Polish. If your WordPress site is behind Cloudflare (Pro tier), Polish automatically converts all images to WebP at the CDN edge. No plugin, no server configuration — just enable it in the Cloudflare dashboard. This also handles caching and global CDN delivery in one step.
Option 3: Upload WebP directly. Pre-convert images to WebP using the JPG → WebP converter before uploading to WordPress. WordPress stores and serves them as WebP. Add a JPEG as a fallback in your theme's <picture> element if needed for legacy compatibility.
The Optimal Pre-Compression Workflow
For sites where you want maximum control without plugin complexity:
1. Start with original file (JPEG from camera, PNG from designer)
2. Compress at quality 78–80% using convertlo.pro/compress.html
→ A 4 MB original becomes ~500–700 KB
3. (Optional) Convert to WebP using jpg-to-webp.html
→ 500 KB JPEG becomes ~340 KB WebP
4. Upload to WordPress media library
→ WP re-encodes at quality 82 (barely touches an already-80% image)
→ Result: optimized image, single clean compression pass
5. WP generates its thumbnail sizes from the pre-compressed upload
→ All derivatives are also well-optimized
The key insight: WordPress's quality-82 re-encode barely affects a JPEG you've already compressed to quality 78–80. The difference between quality 78 and quality 82 is imperceptible — but it means WP's pass doesn't introduce any additional visible degradation. You get the size savings from your pre-compression, and WP's overhead is minimal.
Frequently Asked Questions
Should I compress images before uploading to WordPress?
Yes — compress to quality 78–80% before uploading using
the compressor. WordPress re-encodes at quality 82, so pre-compressing first means only one clean compression pass happens, not two. This gives you the size savings without compounding quality loss.
What is the best WordPress image compression plugin?
ShortPixel for most sites — good free tier (100 images/month), excellent compression quality, AVIF/WebP delivery, and reliable API. Smush for sites needing unlimited free lossless compression. Imagify for aggressive compression on content-heavy blogs. For small sites where you pre-compress before uploading, no plugin is often the right answer — use Cloudflare Polish instead.
Does WordPress automatically compress images?
Yes — WordPress re-encodes every uploaded JPEG at quality 82 using GD or Imagick. It also generates 4–6 thumbnail sizes from each upload. This means your uploaded image gets automatically optimized, but not as aggressively as dedicated compression tools. Pre-compressing before upload or using a plugin achieves significantly better results.
How do I serve WebP images in WordPress?
Three options: (1) Install ShortPixel or Imagify — they auto-create WebP versions and serve them via .htaccess rewrites. (2) Enable Cloudflare Polish (Pro plan) — auto-converts at the CDN edge, no WP changes. (3) Upload WebP files directly (WordPress 5.8+ supports this natively). For most sites, Cloudflare Polish is the simplest if you're already on Cloudflare.
Why are my WordPress images still large after using a plugin?
Check a few things: (1) Is the plugin applying compression to new uploads only, or also re-processing existing images? Most plugins have a "bulk optimize" feature for existing media. (2) Are dimensions correct? A 4000px image displayed at 800px is 5× oversized — resizing matters as much as compression. (3) Is WebP delivery enabled? Switching from JPEG to WebP delivery alone saves 25–35% even at the same quality.