In this article, we’ll explain how to avoid one of the most common pitfalls webmasters face when managing a WordPress website — how much disk space a website is needlessly consuming. This leads to extra expense to pay for more disk space. Most webmasters don’t realize that when you upload an image, WordPress makes several duplicates of the image in various sizes. This way, if you only need a small image on the site, WordPress can provide a small image that loads quickly. By making several images, WordPress can provide the right sized image that also loads quickly. That’s great so far.

The user will take a picture with their phone and upload it directly to their site; And that is the mistake. Digital cameras take pictures at resolutions that are so big, they can’t even be shown in full size on most monitors today. The size of the image is 1 to 4 megabytes. Trust me, it won’t take long to fill up the disk space on your account with files that big.

I’ll use this real world scenario to explain. I uploaded a file named IMG_8459A.jpg which is 1.5 MB in size. WordPress then dutifully created the following files on my account and now the total disk space used is about 2.8 megabytes.

Size  Name
13892 IMG_8459A-100x100.jpg
18880 IMG_8459A-150x150.jpg
31646 IMG_8459A-300x176.jpg
33020 IMG_8459A-335x170.jpg
41931 IMG_8459A-300x300.jpg
42785 IMG_8459A-348x248.jpg
61169 IMG_8459A-370x450.jpg
61547 IMG_8459A-400x400.jpg
74098 IMG_8459A-450x450.jpg
124080 IMG_8459A-768x451.jpg
196582 IMG_8459A-1024x602.jpg
215980 IMG_8459A-1110x630.jpg
376041 IMG_8459A-1536x902.jpg

Typically, I need to use the image one time within a page of my site and it only needs to use up about half the width of the page. That’s about 800 pixels wide and uses 0.12 Megabytes. Remember the original was 1.5 megabytes. So the size file I should have uploaded is about 92% smaller than the original. That’s a savings of 92% of the disk space simply by resizing the image to the size I actually need “before” uploading it to WordPress.

What size images should you use? As a rule of thumb when I’m designing a site, if an image is not going to be a full width image, I reduce the longest dimension (horizontally or vertically) to 800 pixels. The results are perfectly satisfactory about 98% of the time. If the final image is going to be about the size of a business card down to a postage stamp, I would go with 250 to 400 pixels on the longest dimension.  If I need a full width image, I shoot for 1500 or so. You can always test it and then delete it in the Media Library and try again.

Managing images that have already been uploaded. You may already have uploaded a ton of images and want to take control of them. You can basically do three things.

Delete unused images manually. You can hunt and peck your media library to find large images. Then “replace” them with smaller images. The best way to replace images (rather than deleting them, uploading a new image, then finding the page where the old image was and putting in the new image) is a plugin called Enable Media Replace By ShortPixel

Delete unused image automatically. You can use an automated tool to fine unused images. This is not without issues as it may delete images that were uploaded by your theme or other tools that are outside of the standard Media Library uploads. However, if you have a lot of files, this is the way to go with a plugin called: Media Cleaner: Clean your WordPress! By Jordy Meow

Optimize the images you’ve uploaded. This won’t change the dimensions of your images. It will optimize the compression of the image files. It’s not as good as the above, but may be a good start. Use the plugin ShortPixel Image Optimizer by ShortPixel