Why Compressing Images before Uploading Them to WordPress isn’t such a Good Idea

There’s a common misconception that compressing images before uploading them to WordPress is a good practice.

In reality, this approach can lead to unexpected consequences, particularly when it comes to the thumbnails generated by WordPress.

In this post, we’ll learn why it might be wise to reconsider compressing images before uploading them to your WordPress site.

What are WordPress thumbnails?

WordPress thumbnails, also known as image sizes, are different versions of an uploaded image that WordPress automatically generates to fit various display contexts across a website.

When you upload an image to your WordPress media library, WordPress creates multiple resized versions of that image based on predefined dimensions.

wordpress media settings
WordPress Media Settings (Settings > Media)

In addition to these default sizes, themes and plugins can register additional image sizes. For example, a theme might define custom sizes for featured images or header backgrounds.

WordPress provides flexibility in managing these image sizes through the media settings in the admin dashboard (Settings > Media). You can specify default sizes for thumbnails, medium, and large images, as well as enable or disable cropping for thumbnails.

The downside of pre-compression

When you upload a pre-compressed image, WordPress uses it as the source for generating these thumbnails.

While this can help somewhat with thumbnail sizes, it will require extra time and effort from the editor, resulting in thumbnails that are only 22% smaller. Using a plugin like ShortPixel Image Optimizer saves time by automating the process, and the resulting thumbnails are 76% smaller.

original
Original
optimized locally
Optimized locally(22.28% lighter)
optimized
Optimized by ShortPixel(76.39% lighter)
original thumbnails
Original thumbnails
optimize locally thumbnails
Locally optimized thumbnails
optimized shortpixel thumbnails
Thumbnails optimized by ShortPixel
Download exampleDownload exampleDownload example

As depicted in the table above, there are three distinct sets of images: the original image, the original image in a compressed format (optimized-locally) and the original image being optimized using ShortPixel Image Optimizer (optimized-ShortPixel).

Good to know: Notably, the file sizes of the locally uncompressed thumbnails are significantly smaller due to individual processing and optimization of each thumbnail using SmartCompress algorithms.

Solution? Compress images after upload

As outlined above, it’s better to upload uncompressed images to WordPress and have them compressed automatically afterward.

By doing so, you retain the original quality and provide WordPress with high-quality source material to generate thumbnails from.

This approach pays off because uncompressed images ensure that the thumbnails generated by WordPress maintain the highest possible quality while achieving notably smaller file sizes.

Additionally, by uploading uncompressed images, you retain control over the optimization process.

Finally, you can use a plugin like ShortPixel Image Optimizer to fine-tune the compression settings according to your needs, striking the perfect balance between image quality and file size.

Conclusion

While it may seem counterintuitive, refraining from compressing images before uploading them to WordPress is the superior approach.

By preserving the original quality, allowing WordPress to generate thumbnails from uncompressed images, and compressing the images afterward using a plugin, you ensure optimal visual presentation and efficient website performance.

Go unlimited with ShortPixel!

Optimize images effortlessly, with no restrictions or limitations.

Andrei Alba
Andrei Alba
Articles: 25