How to Remove Unused Images in WordPress (no Plugin)

Last updated on
Apr 17, 2024

WordPress has a built-in feature to remove unused images on your WordPress. You can use it clean up your media library in an attempt to reclaim some storage space on your server. This post will show how.

Image itself is one of the file types supported by WordPress. Some image formats you can upload to your WordPress website are PNG, JPG, and GIF. Every image you upload to your website will be stored under the uploads folder (full path: public_html/wp-content/uploads).

You can also access the images you have uploaded from the WordPress dashboard by going to Media -> Library menu. From here, you can find and remove images that are not used on your website.

Why Removing Unused Images is Important?

You can upload as many images as you want to your website. However, you also need to know that the more images you upload, the less spacious your server storage will be. This is a huge problem if you are on a hosting plan with a small storage capacity.

The worst issue you will face when you run out of storage capacity is that you can’t access your WordPress dashboard. Or even worse, your website. That’s why you need to be careful uploading images to your website if you are a low-storage hosting plan.

The good news, you can remove images you no longer need.

How to Remove Unused Image in WordPress

As mentioned earlier, WordPress has a built-in feature that you can use to remove images on your WordPress. So, no need to install a plugin too quickly if you want to remove images you no longer need on your website.

First, go to Media -> Library on your WordPress dashboard. From here, you can find all media files — not just images — you have uploaded to your website. You can filter the media files by date, file type, and status (in use or not).

Since you want to remove unused images, you can select the Unattached option from the dropdown menu. This option will filter all media files that are not used by any post or page on your WordPress website sot that you can delete them.

Filtering all unused images from the Media Library of WordPress.

Click the Bulk select button to mass-select images to remove.

Mass-selecting images to be removed.

Once you are done selecting the images, simply click the Delete permanently button to delete them. Beware that you can undo this step. You can’t restore the images you have deleted.

That’s it. If your intention of deleting unused images on your website is to reclaim storage space, you can check out how much space you have reclaimed after completing the steps above.

Summary

You need to be very wise uploading images to your WordPress website if you are on a low-storage hosting plan. But don’t worry if you uploaded them already. You can reclaim your storage capacity by deleting unused images on your website. WordPress has a built-in feature to do so, as I have just covered.

If you prefer using a plugin to remove unused images, be careful. Some image clean up plugins might only detect images attached to the default post type of WordPress (pages and posts) and ignore images attached to custom post types. Especially if you use MailPoet.

If the image clean up plugin you use accidentally delete the images you used on your MailPoet newsletters, the images won’t show up on the newsletter archive page.

This page may contain affiliate links, which help support the project. Read our affiliate disclosure.

Aliko Sunawang

Aliko is a professional blogger and web creator. He has been blogging with WordPress since 2012. In his spare time, he loves going out to take some photos. More

Turn Your WP Knowledge into revenue ♻️

With the right, algorithm-proof blogging approach.

learn more

Want to turn your WordPress knowledge into sustainable revenue?

Where should we send the template?

Thanks! Please check your inbox to confirm.