If you use a lot of photos and graphics on your WordPress site, you’ve probably accumulated a tonne of image files on your server that you have no use for. This is a quick and effective strategy for cutting down on excess image files and only keeping what you actually need.
The image bloat problem
When you upload a photo or graphic to your site, by default WordPress creates four different sizes of the image: Thumbnail, Medium, Large and Full Size.
In all likelihood, you’re only going to use one of these image sizes. But you’ve now got four or five separate files taking up space on your server.
The image bloat solution
Once you’ve cleared out all those unused image files from your server, this a quick and painless solution to stop WordPress from creating them in the first place.
Many thanks to Marna Friedman for this suggestion, received last week during out WordPress Q & A session.
Simply venture into the Settings > Media panel in the left of your WordPress dashboard. Here you can specify the default dimensions of each pre-defined image size: Thumbnail, Medium and Large. By changing the height and width dimensions to zero, you’re telling WordPress not to create the image file.
And that’s all there is to it.
Note: if you’re going to do this, it’s important that you have the correct size image when you initially upload it. If you only use one image size throughout all your posts and pages, you could consider plugging your desired dimensions into the ‘large’ or ‘medium’ image size, and getting rid of the other two.
This will save you the trouble of resizing images before you upload them, but you’ll be left with one extra image file on your server every time.