Compress Images Before Uploading to WordPress — LCP and Page Speed Guide
FreeCompress images before uploading to WordPress to improve Core Web Vitals. Target dimensions and file sizes by image type to pass LCP thresholds without installing plugins.
What's next
Settings guide
Target Dimensions and File Sizes by WordPress Image Type
| Image Type | Maximum Dimensions | Target File Size | Format |
|---|---|---|---|
| Featured image / hero | 1200 x 628 | Under 150KB | WebP or JPEG |
| Gallery photo | 1200 x 900 | Under 200KB | WebP or JPEG |
| Blog post image | 1000 x 600 | Under 120KB | WebP or JPEG |
| Background image (full-width) | 1920 x 1080 | Under 300KB | WebP or JPEG |
| Product image | 800 x 800 | Under 150KB | WebP or JPEG |
| Sidebar / widget image | 400 x 300 | Under 60KB | WebP or JPEG |
| Logo | 400 x 100 | Under 20KB | SVG or PNG |
LCP (Largest Contentful Paint) targets
The largest image in the initial viewport — typically the hero or featured image — is the LCP element. Google's Core Web Vitals target for LCP is under 2.5 seconds. For LCP images: keep width under 1200px, file size under 150KB, and use WebP format where your theme supports it.
Plugin vs. pre-upload compression
Compression plugins (Imagify, ShortPixel, Smush) compress images after upload. Pre-upload compression from this tool gives you more control, eliminates API limits, works offline, and does not expose your image files to third-party servers. Use pre-upload compression for a clean library from the start.
Format comparison
WordPress compression plugins vs. pre-upload compression
Compression plugins are convenient but introduce trade-offs. API-based plugins (Imagify, ShortPixel) send your images to external servers for processing — a privacy consideration for client images or proprietary product photos. Free tiers have monthly compression limits (Imagify: 20MB/month free). Plugin-side compression also happens after the fact, meaning your Media Library already stores the uncompressed original.
Pre-upload compression solves all three issues: processing stays on your device, there are no API limits, and the library only ever receives correctly sized files. The trade-off is that pre-upload compression requires a manual step before each upload. For high-volume publishing workflows, a plugin may be more practical. For client sites or privacy-sensitive content, pre-upload compression is the better choice.
How it works
Upload your image
Drop any JPEG, PNG, or WebP file into the compressor.
Set target dimensions
Choose dimensions appropriate for your WordPress image type — hero, gallery, product, or thumbnail.
Compress to target file size
Reduce to under 150KB for LCP images, under 200KB for gallery photos. Adjust quality slider while comparing the before/after preview.
Download and upload to WordPress
Save the optimised file and upload it to your Media Library. WordPress serves the correct size immediately.
About this format
Image weight is the single largest contributor to slow WordPress page loads. A WordPress homepage with four full-resolution uploaded photos — each exported from a camera at 6–10MB — loads 40–60MB of image data before WordPress attempts any resizing. By the time WordPress generates its responsive image sizes and a browser downloads the right one, you have already lost the visitor.
The correct approach is to compress and resize images before uploading them to the WordPress Media Library. This controls exactly what enters the library, reduces storage consumption, and removes the dependency on WordPress's own resizing quality (which varies significantly by hosting environment).
Targeting specific dimensions and file sizes by image type — featured images, gallery photos, background images, sidebar thumbnails — before upload means WordPress serves correctly sized files from day one rather than serving oversized originals with client-side resizing.