How to Compress Images in WordPress: Complete 2025 Guide

๐Ÿ“… June 5, 2025 โฑ๏ธ 9 min read ๐Ÿท๏ธ WordPress

Unoptimized images are the most common cause of slow WordPress sites. A site that takes more than 3 seconds to load loses 40% of its visitors before they see anything. This guide shows you how to fix that problem step by step.

Table of contents

  1. Optimize before uploading to WordPress
  2. Recommended image sizes for WordPress
  3. Best compression plugins for WordPress
  4. How to optimize images already uploaded
  5. Enabling WebP in WordPress
  6. Lazy loading: only load visible images

Optimize before uploading to WordPress

The best time to compress an image is before uploading it to WordPress. Once uploaded, WordPress generates multiple sizes (thumbnail, medium, large) from the original โ€” if the original is large, all versions will be large.

The correct workflow is:

  1. Resize the image to the maximum size you need (usually 1200โ€“1600px wide)
  2. Compress the image with a tool like ComprimirPro
  3. Upload the already-optimized file to WordPress

Compress your images before uploading

Reduce file size by up to 90% in your browser, no registration or installations needed. Your files never leave your device.

โšก Compress images for free

Recommended image sizes for WordPress

Use caseRecommended widthTarget file size
Featured image / hero1200โ€“1600 px< 200 KB
Blog post image800โ€“1000 px< 100 KB
Product image (store)800โ€“1200 px< 150 KB
Thumbnail300โ€“400 px< 30 KB
Logo200โ€“400 px< 20 KB
Avatar / author photo150โ€“200 px< 15 KB

Tip: Don't upload camera photos directly (3โ€“8 MB). A 5 MB photo can be compressed to under 150 KB with no visible quality loss.

Best compression plugins for WordPress

If you prefer to automate compression inside WordPress, these are the most recommended plugins:

Imagify FreePremium

One of the best optimization plugins. Automatically compresses on upload, converts to WebP, and bulk-optimizes old images. The free plan includes 25 MB/month.

ShortPixel FreePremium

Excellent value for money. The free plan offers 100 images/month. Very popular on sites with many product images.

Smush Free

The most installed optimization plugin on WordPress (over 1 million active installs). The free version is quite complete for small and medium sites.

PluginFree planFree WebPFree bulk
Imagify25 MB/monthโœ…โœ…
ShortPixel100 img/monthโœ…โœ…
SmushUnlimitedโŒโœ…

How to optimize images already uploaded

If you have a site with hundreds of unoptimized images, all the mentioned plugins include a bulk optimization feature that processes your entire media library. The process is simple:

  1. Install your preferred plugin
  2. Go to the plugin's settings section
  3. Look for the "Bulk optimize" option
  4. Start the process and wait (may take a while depending on the number of images)

Always make a backup first before bulk optimizing. Although plugins keep backups of the originals, it's good practice to have a full site backup.

Enabling WebP in WordPress

Since WordPress 5.8, there is native support for serving images in WebP. However, to automatically convert existing images to WebP you'll need one of the plugins mentioned above (Imagify or ShortPixel do this transparently).

With Imagify, the process is:

  1. Go to Imagify โ†’ Settings
  2. Enable "Create WebP images"
  3. Enable "Display WebP images on the front-end"
  4. Save and done โ€” WordPress will automatically serve WebP to supporting browsers

Lazy loading: only load visible images

Lazy loading makes images that are off-screen not load until the user scrolls toward them. This dramatically improves initial load time.

Since WordPress 5.5, lazy loading is enabled by default for all images (via the loading="lazy" attribute). If you're using an older theme or page builder, verify it hasn't been disabled.

To enable it manually on specific images:

<img src="photo.webp" alt="Description" loading="lazy" width="800" height="600">

Related articles

โšก
ComprimirPro Team

Image optimization and web performance specialists. We share practical guides to make the web faster.

Ready to compress your images?

Free, instant, private. No sign-up required.

โšก Use ComprimirPro now