Oddly enough, when you upload an image to WordPress, it doesn’t just upload it, it does a couple of things.
Downgrading image quality in WordPress
It is a little known issue, but when you upload a .jpg image, WordPress reduces its quality by 10%, to optimise space and transfer. In principle this is not noticeable, but in some cases, when the image is already highly optimised, and it is usually quite large, some details that indicate a lower image quality can be seen.
This is especially noticeable if the photo has a very good resolution and is of considerable size, occupying a large part of the screen, or even as a paralax or web background.
Automatically create 3 (or more) versions of the image
Once again, a detail that you can’t see at first glance, until one day you are surprised by the sheer number of files in your media folder. It turns out that every time you upload an image through WordPress, it triples it, creating 3 more versions of different sizes.
By default these sizes are 150×150, 300×300 and 1024×1024, but we can easily change that in Settings / Media, where we will see the following:
Any change we make there will automatically modify the size of those images created by WordPress, so that the “thumbnail” size, the “Medium” size and the “Large” size will be the ones you indicate from that moment on. But be aware that this change is not retroactive. If you want to change the sizes of all the thumbnails that were uploaded at the time, you will have to install and run the plugin regenerate thumbnails. But… What’s the point of that? Who uses those sizes? Why does WordPress create them?

The reason is simply for convenience. WordPress assumes that our theme (theme, template) will probably use the images in several places: As a featured image, a thumbnail in the post listing, within the post, etc. And that’s why it creates 3 sizes a priori “just in case” the theme uses them.
But the truth is that in many occasions the theme has its own image sizes in mind, and far from using those three (which it doesn’t know what dimensions they are) it creates its own. And sometimes even some plugins create their own, as is the case of WooCommerce, which creates three more sizes for product images. So, in the end we may end up with 6 or 8 new image file sizes each time we upload an image.
It is easy to spot these auto-generated images because they all have the name of the original image, followed by a hyphen and the size in pixels width times height.
The theme creates some, WooCommerce creates some, and other plugins create some.
Is there anything we can do about it? Well, there is a little trick that will save us some hard disk space. It turns out that WordPress only creates those images if the dimensions of the image we upload are bigger than the ones we have indicated. In other words, this automatic process only reduces images, but never “enlarges” them (as they would be pixelated). So if we set a size of 0 in all the slides (thumbnail, medium and large), it will never create them, because no matter how small the image we upload, it will never be smaller than zero.
I hope you find this article useful and that it sheds some light on this question that so many people ask themselves.
Leave a Reply