How To Clean Up Your WordPress Media Library
Media files are often necessary additions 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.
Fortunately, 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!
Why You Should Clean Up the WordPress Media Library
When you upload an image to your Media Library, WordPress makes several copies of it. Additionally, different themes and plugins may also request a variety of image sizes. Consequently, your Media Library can amass a lot of files that you may not be aware of.
Ultimately, this can bog down your entire website, as all those images take up space on your web server. Another problem that can arise from a cluttered Media Library is oversized website backups. If you have an automatic backup process configured, your backup files can become large and unwieldy.
Depending on your web hosting plan, all those extra files could eventually cost you more each month, in addition to creating an overall slowdown. Still, it’s important to make at least one copy of your current website before tackling a Media Library cleanout. This is because most cleanout processes mean you’ll be deleting certain files for good.
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 eventually decrease its functionality.
For example, the more files that are uploaded to a website, the longer it will take to load. This can slow down site speeds, and may drive visitors away. It can also interfere with the site’s User Experience (UX).
There are many factors that contribute to media space usage – one of the most important being image size. By uploading smaller images to your Media Library instead of just downsizing larger images with HTML, you can increase the space available on your server. This should contribute to improved site speeds, both on the front and back ends.
Image scaling is also 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 reduction in file size.
What’s more, how you treat images on your website can have a crucial impact on your website’s Search Engine Optimization (SEO). To learn more, check out our in-depth resource on image optimization and SEO.
Use JPG Images Instead of PNG
Another factor that impacts media space usage is the image file types 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. PNGs are often of higher quality, but this isn’t a dealbreaker for the majority of website images. The only time you really need to use PNGs is when you require a transparent image background.
When you use 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 sometimes upload multiples of the same image, duplicate images are usually caused by WordPress’ automatic creation of multiple image formats (such as Thumbnail, Medium, and Large). As we mentioned before, 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 on 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’ Media Library is quite intuitive, which is beneficial for even the most 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 that you may find useful.
Media Cleaner is a simple plugin, but one that makes the removal of unused media files simple. Once installed, this tool 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.
WP-Optimize offers many features related to cleaning and optimizing your website’s files. Specifically, you can set the plugin to automatically clean out ‘orphaned’ images or images set to certain sizes. Additionally, you can configure an optimization schedule that fits your website.
WP Cleaner is a multi-function website cleaning plugin. However, it does have specific media-related features. For example, you’ll be able to review the total weight of your media files. Additionally, the user-friendly dashboard can help you identify unused media files and delete them in bulk or individually. WP Cleaner will also identify and include media added through any major page builder plugin.
How to Manually Clean Up the WordPress Media Library
If you want to forego adding another plugin to your website, you have another option. You can clean up your WordPress Media Library manually.
Before doing so, it’s a good idea to back up your website. This can be done with a plugin such as BackUpWordPress.
You can also back up only your Media Library via File Transfer Protocol (FTP). Simply download the wp-content folder from your site’s server, and save it in a safe location (such as in cloud storage).
Once you’ve preserved your current website’s content, you can begin to clean out and delete the files in your library that you no longer need. This can be done by going to Media > Library in your dashboard. To delete a single image, click on it and then choose the Delete Permanently option at the bottom of the screen.
A popup will appear, and clicking on 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 media. From the Media Library page, click on Bulk Select at the top.
Click on all the files you’d like to delete, and choose Delete Selected. Then select OK to permanently remove those 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 (although the more frequently you complete it, the better).
If you choose to delete your files using the dashboard as described above, you’ll also want to double-check them using FTP. Depending on how they were added, some images may still be hanging around on your server, so it’s important to make sure they’re removed for good.
Excel with WP Engine
Much like a messy room, a cluttered Media Library probably isn’t very functional. Fortunately, we’re here to help you learn more about exceptional website management.
Often, this starts by accessing top-notch developer resources. Additionally, if you’d like to learn more about our responsive customer service and reliable uptime, be sure to check out our managed hosting plans!