How To Clean Up Your WordPress Media Library
Media files are often a necessary addition to any website. However, it’s easy for your WordPress Media Library to become full of unused files, which can slow down your website and make media management difficult.
However, managing your Media Library need not be a cumbersome task. By cleaning it up regularly and optimizing your images appropriately, you can be sure your website (and its media contents) are operating at their best.
In this post, we’ll discuss various ways to clean up your WordPress Media Library. We’ll then introduce three image cleanup plugins that can make the process easier. Let’s get started!
Reduce The Amount of Used Storage
The amount of storage space available to you will depend on your host. These limitations are put in place for good reason, as too much media uploaded to your website will decrease functionality.
For example, the more files uploaded to a website, the longer it will take to load. This can slow down site speeds, and this may drive visitors away. It can also interfere with User Experience (UX).
There are many factors that contribute to media space usage – one being image size. By uploading smaller images to your Media Library instead of just downsizing larger images with HTML, you increase the space available on your server. This will contribute to improved site speed, both on the front and back ends.
Image scaling is a great way of resizing your images without losing out on quality. In short, it enables you to use the minimum number of pixels to display your image, which directly correlates with a reduced file size.
Use JPG Images Instead of PNG
Another factor that impacts media space usage is the image file type you use. The two most common are JPG and PNG, but the former is best when it comes to saving space.
When comparing JPG and PNG images side by side, you’ll notice a slight difference in quality. The truth is, PNG is of a higher quality, but it’s not a dealbreaker for the majority of website images. The only time you really need to use PNGs is when you need a transparent image background.
Using JPG instead of PNG, your images will naturally be of a smaller size. Of course, you can compress (or scale them) further if necessary.
Eliminate Duplicate Images
While you may have uploaded multiples of the same image, usually duplicate images are caused by WordPress’ automatic creation of multiple image formats (such as Thumbnail, Medium, and Large). This can quickly fill up your available storage space, while also slowing your website down.
Fortunately, this is something you can easily put a stop to. To do so, head to Settings > Media within your WordPress dashboard:
To prevent the creation of multiple image sizes, simply change the values in each box to 0. Then, click Save Changes:
With no dimensions in place, WordPress will no longer be able to save multiple sizes of the same image.
Delete Unused Files and Images
One of the easiest ways to unload storage space and keep your site running at its best is to delete all of your unused files and images.
From the WordPress dashboard, go to Media > Library. To delete a single image, click it, then choose the Delete Permanently option at the bottom of the screen:
A popup will appear on screen. Clicking OK will remove the file from your Media Library.
You can also bulk delete files and images, which is a quicker way of managing unused files. From the Media Library page, click Bulk Select at the top:
Click on all files you’d like to delete, and choose Delete Selected. A popup will appear and, just like above, click OK to permanently remove these images:
It’s not uncommon to ‘collect’ files over time that aren’t necessary. This is why you should repeat this process at least every other month (though, the more frequent the better).
Plugins For Image Cleanup
WordPress’s Media Library is quite intuitive, which is beneficial for even the least experienced users. However, you may find that you need a bit more help when it comes to Media Library management. Here are three WordPress plugins for image cleanup you may find useful.
Media Cleaner is a simple plugin, but one that makes the removal of unused media files simple. Once installed, the plugin will add all files not being used on your website (such as in posts, pages, or galleries) to a temporary trash bin. You can then look over the files to be sure you want to delete them, and make their removal permanent.
Similar to Media Cleaner, Image Cleanup indexes any unused image files and moves them to a temporary trash folder. You then remove the images to a temporary backup folder and check to make sure no important files have been removed. Once you’re sure, you can then delete the backup folder and clear space in your Media Library.
DNUI stands for “Delete Not Used Image”, and that’s exactly what it does. The plugin will index your website, looking through pages, posts, excerpts, drafts, and image galleries. If there are any images in your Media Library not in use, it will tag them as such and delete them. Of course, the plugin does create a backup file of deleted images (giving you chance to rollback a deletion). Though, you should consider making your own backups for extra security.
Download & Backup Your Media Library
Whether you’re cleaning up your Media Library, or you’re just wanting to make a copy of your website’s contents, you can download and backup your Media Library with ease.
The former requires that you backup your entire website (which is something you should do frequently). This can be done with a plugin such as BackUpWordPress:
Are you interested in learning more about proper website management? Take a look at the WP Engine blog. If you’d like to learn more about what we offer, such as top-notch customer service and reliable uptime, be sure to check out our managed hosting plans!