Guide
How to compress images for a WordPress website
WordPress handles some image optimization automatically, but it does not do everything. Understanding what WordPress does and does not do helps you decide what to prepare before uploading and where a plugin might actually help.
Why image optimization matters for WordPress performance
Images are typically the largest contributors to page weight on a WordPress site. A page with several unoptimized images can easily be 5 MB to 15 MB, which translates to slow load times, poor Core Web Vitals scores, and higher bounce rates — especially for visitors on mobile connections.
Page speed affects more than user experience. Google uses Core Web Vitals as a ranking factor, and Largest Contentful Paint (LCP) — which measures how fast the largest visible element loads, usually an image — is one of the primary metrics. Slow-loading images hurt both rankings and conversions.
The good news is that image optimization for WordPress does not require advanced technical knowledge. A straightforward approach of preparing images correctly before upload, understanding what WordPress handles automatically, and optionally using a plugin for ongoing optimization handles most cases.
What WordPress does with images automatically
When you upload an image to WordPress, the platform generates multiple resized versions automatically based on your theme's registered image sizes. By default, WordPress creates a thumbnail (150 by 150 pixels), a medium size (up to 300 by 300 pixels), a medium-large size (768 pixels wide), and a large size (up to 1024 by 1024 pixels), in addition to keeping the original uploaded file.
WordPress does not apply quality optimization to these generated sizes in a meaningful way by default. The resized versions are created at the same quality as the original upload, which means an unoptimized 3 MB original produces unoptimized resized copies that are still larger than they need to be.
WordPress also does not convert images to WebP by default in older installations, though WordPress 6.1 and later includes basic WebP generation. Whether WebP is actually served depends on theme and server configuration. For most practical WordPress setups, manual optimization before upload or a plugin is still the most reliable approach.
What to optimize before uploading
The most important thing to prepare before uploading to WordPress is dimensions. Uploading an image that is far larger than the maximum displayed size wastes storage and forces WordPress to create resized copies from an unnecessarily large source. For most blog post images, resizing to 1200 to 1600 pixels wide before uploading is more than sufficient.
The second thing to prepare is file size. Compressing to a reasonable quality level before upload means WordPress works from a more efficient source. JPG images at quality 80 to 85 strike a good balance for photographic content. PNG is appropriate for screenshots, graphics, and images with transparent backgrounds.
Format matters too. If your WordPress site is configured to serve WebP and your theme supports it, uploading WebP directly can save additional bandwidth. If not, JPG for photos and PNG for graphics is the reliable standard approach.
- Resize to actual display width before uploading (1200 to 1600 px wide for most blog images).
- Compress JPG photos to quality 80 to 85 before uploading.
- Use PNG for screenshots, graphics, and transparent backgrounds.
- Use WebP if your theme and server configuration support it natively.
Target dimensions for different placements
Featured images are typically the largest images on a WordPress post or page. They often display at full container width in post headers, archive grids, and social media previews. For most themes, preparing featured images at 1200 by 628 pixels (the standard open graph image size) works well for both the WordPress display and social sharing previews.
In-content blog images depend on the content column width of your theme. Most themes have a content column between 600 and 900 pixels wide. Uploading an image at 1200 pixels wide gives retina displays a good source while keeping file size manageable. For images where retina sharpness matters less, 900 pixels wide is sufficient.
Gallery images, product photos in WooCommerce, and background images all have their own optimal sizes depending on theme and layout. Check the theme documentation for registered image sizes, or use the WordPress media settings to see the configured values.
WebP support in WordPress
WordPress has supported WebP uploads natively since WordPress 5.8. As of WordPress 6.1, the platform began generating WebP versions of uploaded JPEG images automatically in some configurations. However, whether WebP files are actually served to visitors depends on hosting, server configuration, and theme support.
If your hosting environment supports WebP and your theme is properly configured, serving WebP can reduce image payload by 25 to 35 percent compared to JPG. This is meaningful for page performance.
Plugins like Imagify, ShortPixel, Smush, and WebP Express can automate WebP conversion and delivery, handling browser detection and fallback for older clients. If performance is a priority and your hosting supports WebP, enabling it through a plugin is one of the more impactful optimizations available.
When a plugin actually adds value
If you upload images regularly and want automatic optimization without preparing every image manually, an image optimization plugin is a reasonable choice. Plugins like Imagify, ShortPixel, and Smush connect to optimization APIs that compress images automatically on upload and can also optimize your existing media library in bulk.
Plugins add the most value in workflows where images come from multiple contributors, where the same site has a large existing library of unoptimized images, or where generating and serving WebP automatically is a priority. For small blogs where the site owner uploads images personally and can prepare them before upload, a plugin is optional.
One important note: plugins that process images through external APIs send your image data to a third-party server. For most WordPress images this is fine, but if your site handles sensitive or confidential visual content, manual optimization before upload is the more privacy-appropriate approach.