Skip to content

Compress Images Before Uploading to WordPress — LCP and Page Speed Guide

Free

Compress 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.

wordpress image optimizationoptimize images for wordpresswordpress image size guide
All Image Tools

Settings guide

Target Dimensions and File Sizes by WordPress Image Type

Image TypeMaximum DimensionsTarget File SizeFormat
Featured image / hero1200 x 628Under 150KBWebP or JPEG
Gallery photo1200 x 900Under 200KBWebP or JPEG
Blog post image1000 x 600Under 120KBWebP or JPEG
Background image (full-width)1920 x 1080Under 300KBWebP or JPEG
Product image800 x 800Under 150KBWebP or JPEG
Sidebar / widget image400 x 300Under 60KBWebP or JPEG
Logo400 x 100Under 20KBSVG 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

1

Upload your image

Drop any JPEG, PNG, or WebP file into the compressor.

2

Set target dimensions

Choose dimensions appropriate for your WordPress image type — hero, gallery, product, or thumbnail.

3

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.

4

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.

Frequently asked questions

What is the best image size to upload to WordPress?+
It depends on the image type. Featured images: 1200x628px, under 150KB. Gallery photos: 1200x900px, under 200KB. Background images: 1920x1080px, under 300KB. Smaller thumbnails and sidebars: 400px wide, under 60KB. Pre-resize before uploading rather than relying on WordPress's resizing.
Do I still need an image compression plugin if I compress before uploading?+
Not necessarily. Pre-upload compression handles the same job as a plugin — reducing file size to improve page speed. You may still want a plugin for features like responsive image srcset management or WebP conversion automation, but compression itself does not require a plugin if you optimise before uploading.
What file format should I use for WordPress images?+
WebP gives the best file size reduction — typically 25–35% smaller than JPEG at equivalent quality. WordPress 5.8 and later supports WebP natively. For older setups or themes without WebP support, JPEG at 82–85% quality is the reliable fallback.
How do image file sizes affect Core Web Vitals?+
Oversized images are the most common cause of poor LCP (Largest Contentful Paint) scores. If your hero or featured image is over 300KB and takes more than 1 second to download, your LCP will likely exceed the 2.5-second target. Compressing the LCP image is usually the highest-ROI Core Web Vitals fix.
Does this tool send my images to WordPress.com or any server?+
No. All compression runs in your browser. Your images never leave your device.

Related tools and guides