Try to avoid using WordPres plugins for image compression

Try to avoid using WordPres plugins for image compression

In the previous lesson, we learned how to compress images manually.

But, if you have a lot of images to compress on your website, it could feel like a daunting task.

It is a lot of hard work if we are going with a manual route.

So, to avoid this manual work, most people look for WordPress plugins that could automatically optimize all the images on the website.

Some good options are Imagify, EWWW, Smush Pro, etc.

But sometimes, these plugins often destroy the quality of the image in the name of compression.

If you notice the image, it is damaged and pixelated because of too much compression.

After all, plugins are not humans when it comes to judging the quality of the images by visually looking at them, right?

They also impact the performance of the website negatively during the time of image compression activity.

The reason behind this is pretty simple.

Based on the configured settings, an image compression plugin performs two operations on every image uploaded:

  1. Resize the image according to the settings
  2. Compress the image

Both these are resource-intensive operations.

If you remember, with the manual approach, we are doing the same thing manually.

They are resource intensive in terms of disk space too because some plugins keep a copy of the original image and the compressed image on the server's disk.

This increases the cost of hosting services in the long run by a large margin.

So, it is better to compress the images manually if you can.

If you can compress images manually:

  1. You can have better control over the quality of the image
  2. You can save some disk space on the server
  3. You can save server resources
  4. You can save some money because of WordPress compression plugins because they are not cheap.
  5. Reduce dependency on an image compression plugin and save at least $5 per month.

Got it, but I have thousands of images, and I can't compress them manually :(

I can understand.

If you can't compress them manually, then go with the image compression plugins but first try using them on a staging site.

This way, you can experiment with various compression settings, and even if images get destroyed, you have nothing to lose.

Fair enough?

"Yep! Yep! What is a staging site anyway?"

A staging site is nothing but a clone of your live website.

And because it is just a clone, you can perform experiments without worrying about the images or website getting permanently damaged.

Most hosting services provide the staging site feature.

💡
Please remember that uploading heavy images to the WordPress media library and expecting image compression to do the compression is just a bad habit.

Please try to get rid of it if you are serious about your website's health. 

Case study time

I have a client who maintains three websites on Hostgator's shared hosting service.

The Hostgator service comes with unlimited disk space under a fair usage policy.

So, the client uploaded images with huge dimensions without compressing them.

Later, when those three sites started receiving some traffic, the shared-hosting service started throwing 500 internal server errors because of a lack of server resources.

The ideal solution was to move to a dedicated hosting service so that there are no server outages due to traffic.

But each site was sitting around 11 GB. So, that is nearly a total of 30 GB that needs to be migrated to the new server.

Now this is a problem for the client because dedicated hosting services charge you extra money for every 25GB of disk space.

So, the client decided to compress the images using image compression in the hopes of reducing the disk space needed.

But because image optimization plugins are CPU intensive in nature, the compression activity resulted in more server outages.

💡
Because of issues like this, the image compression plugins got smarter and are performing the optimization on their own servers instead of using the website owner's server.

But this increased the price of the image compression service because they upload your website images to their server, compress them, and then push them back to your website.

In the end, we moved to a dedicated hosting server at a higher price package, then compressed the images, and then downgraded to a lower pricing package.

Downgrading the server was a mess too.

All this nonsense put my client in a stressful situation and this situation could have been easily avoided if the client had compressed the images first and then uploading to the website.

So, don't take image compression lightly.

Compress images on your computer before uploading them and try to stop relying on image compression plugins.