Image Optimization for WordPress
Images typically account for 50-80% of a website's file size. Poorly optimized images are the most common cause of slow WordPress sites.
The good news? Image optimization is relatively simple, and the effect is often dramatic.
Typical Results
Proper image optimization can reduce your site's load time by 40-60%. This improves user experience, SEO, and conversion rates.
Why Images Make Your Site Slow
A typical image from a camera or smartphone is 3-8 MB. Upload it directly to WordPress, and you have a problem.
The Problems:
- Large files = long load time – Browsers must download everything
- Wrong dimensions – A 4000px image shown as 400px wastes bandwidth
- Outdated formats – JPEG and PNG are no longer the most efficient
- No lazy loading – All images load at once
The 4 Pillars of Image Optimization
1. Compress Your Images
Compression reduces file size without visible quality loss. There are two types:
Lossy compression
- Removes data not visible to the eye
- Can reduce size by 60-80%
- Good for photographs
Lossless compression
- Preserves all data
- Typically 10-30% reduction
- Good for graphics and icons
For most website images, lossy compression at 80-85% quality is the right balance. The difference is invisible, but the savings are significant.
2. Use the Right Formats
Image formats have evolved, and you should use modern formats:
| Format | Best for | Browser support |
|---|---|---|
| WebP | Everything (photos and graphics) | 97%+ of browsers |
| AVIF | Highest compression | 92%+ of browsers |
| JPEG | Fallback for older browsers | 100% |
| PNG | Transparency (when necessary) | 100% |
| SVG | Logos, icons, simple graphics | 100% |
My recommendation:
- Use WebP as standard
- Use AVIF for even better compression if possible
- JPEG as fallback
- PNG only when you need transparency
- SVG for all logos and icons
3. Correct Dimensions
Never upload an image larger than it will be used:
| Use | Recommended width |
|---|---|
| Full-width hero | 1920px max |
| Blog images | 1200px |
| Thumbnails | 400-600px |
| Product images | 800-1200px |
Example of savings:
A 4000x3000px image (original from camera):
- Original: 5.2 MB
- Scaled to 1200px: 350 KB
-
- WebP compression: 120 KB
That's 97% reduction!
4. Lazy Loading
Lazy loading means images only load when they become visible. Visitors who don't scroll down don't download images at the bottom of the page.
WordPress has built-in lazy loading since version 5.5, but plugins can improve it further.
The Best Image Optimization Plugins
1. ShortPixel (My Favorite)
Price: Free (100 images/month) | From $4.99/month
ShortPixel compresses automatically when you upload and can convert to WebP.
Advantages:
- Excellent compression
- Automatic WebP conversion
- Can optimize existing images
- Keeps originals as backup
- API for developer integration
2. Imagify
Price: Free (20 MB/month) | From €4.99/month
Made by the people behind WP Rocket. Simple and effective.
Advantages:
- Extremely easy setup
- Three compression levels
- Integrates perfectly with WP Rocket
- WebP support
3. Smush
Price: Free (limited) | Pro: $6/month
Popular choice with good free version.
Advantages:
- Generous free version
- Lazy loading included
- CDN in Pro version
- Bulk optimization
4. EWWW Image Optimizer
Price: Free | Premium: $7/month
Can run locally or via cloud.
Advantages:
- Local optimization (no upload to external server)
- No monthly limit in free version
- WebP conversion
- ExactDN CDN in premium
Comparison
| Plugin | Free limit | WebP | Best for |
|---|---|---|---|
| ShortPixel | 100 images/month | ✅ | Best compression |
| Imagify | 20 MB/month | ✅ | WP Rocket users |
| Smush | 50 images at a time | Pro only | Beginners |
| EWWW | Unlimited (local) | ✅ | Privacy-focused |
Manual Optimization (Without Plugins)
Prefer to optimize before upload? Here are the best tools:
Online Tools (Free)
| Tool | URL | Advantages |
|---|---|---|
| Squoosh | squoosh.app | Google's tool, excellent |
| TinyPNG | tinypng.com | Simple, effective |
| Compressor.io | compressor.io | Compare before/after |
Desktop Software
| Program | Platform | Price |
|---|---|---|
| ImageOptim | Mac | Free |
| FileOptimizer | Windows | Free |
| Photoshop | All | Paid |
| GIMP | All | Free |
Workflow for Manual Optimization
- Scale image to correct size (max 1920px for hero, 1200px for blog)
- Export as WebP with 80-85% quality
- Upload to WordPress
Squoosh.app is my favorite for quick optimization. You can see exactly how compression affects the image and adjust quality.
WordPress Settings
Image Sizes
WordPress automatically generates multiple sizes of each image. Check your settings under Settings → Media:
Thumbnail: 150x150px (square)Medium: 300x300px maxLarge: 1024x1024px maxFor modern sites I recommend:
Thumbnail: 150x150pxMedium: 600x600pxLarge: 1200x1200pxAvoid "Full Size"
Never insert images as "Full Size" in the editor. Always choose the appropriate size:
- Small: Thumbnails and small icons
- Medium: Images in text
- Large: Featured images and hero sections
CDN for Images
A Content Delivery Network (CDN) serves images from servers close to your visitors.
Popular CDN Options:
| CDN | Price | Advantages |
|---|---|---|
| Cloudflare | Free tier | Easy setup, good free plan |
| BunnyCDN | $0.01/GB | Cheap, fast |
| ShortPixel CDN | Included in plugin | Integrated optimization |
| Jetpack | $9/month | WordPress integration |
A CDN significantly improves load time for visitors far from your server. If you have international visitors, CDN is almost a must.
Advanced: Next-Gen Formats
WebP
WebP is Google's image format from 2010. It provides:
- 25-35% smaller file size than JPEG
- Support for transparency (like PNG)
- 97%+ browser support
Most optimization plugins can automatically serve WebP to browsers that support it.
AVIF
AVIF is the newest format (2019) and provides even better compression:
- 50% smaller than JPEG
- 20% smaller than WebP
- Growing browser support (92%+)
WordPress 6.5+ supports AVIF uploads natively.
Implementation
The best approach is to serve the best format each browser supports:
1. Browser requests image2. Server checks browser capabilities3. Server sends AVIF > WebP > JPEG (by support)Plugins like ShortPixel and Imagify handle this automatically.
Checklist: Image Optimization
Use this checklist to ensure your images are optimized:
Before Upload
- ☐ Scaled to correct dimensions (max 1920px)
- ☐ Compressed (80-85% quality)
- ☐ Converted to WebP (if possible)
WordPress Setup
- ☐ Image optimization plugin installed
- ☐ Automatic compression enabled
- ☐ WebP conversion enabled
- ☐ Lazy loading enabled
Ongoing
- ☐ Bulk-optimize existing images
- ☐ Check PageSpeed for image warnings
- ☐ Delete unused images regularly
Frequently Asked Questions
Does compression destroy my images?
No, not noticeably. At 80-85% quality, humans can't see the difference, but file size is reduced significantly.
Should I optimize existing images?
Yes! Most plugins can bulk-optimize all existing images. It can take time, but it's worth it.
What about retina screens?
For retina screens (2x resolution), upload images that are twice as large as displayed. WebP compression keeps file size reasonable.
Lazy loading – does it make a difference?
Yes, big difference. Pages with many images can save 50%+ initial load by only loading visible images.
WebP or AVIF?
Use WebP as standard – it has broad support. AVIF is better but has slightly less support. Ideally: Serve AVIF to browsers that support it, WebP to the rest.
How do I check if my images are optimized?
Run your site through PageSpeed Insights (pagespeed.web.dev). It shows exactly which images can be optimized and how much you can save.
Conclusion
Image optimization is one of the most effective speed improvements you can make:
- Install an optimization plugin (ShortPixel or Imagify)
- Enable automatic compression and WebP
- Bulk-optimize existing images
- Upload in correct dimensions going forward
The result? A significantly faster site, better SEO, and happier visitors.
Want professional help optimizing your WordPress site's speed? Contact me for a free analysis.




