Webstick.blog logo Wordpress, Design, SEO, Speed blog

WordPress Delete Unused Images [2024] 💥

WordPress Delete Unused Images

This question is probably something you've asked yourself. How do I delete images that are not being used in WordPress? Is it possible to quickly identify which images aren't being used on any given web page and remove them from WordPress? A WordPress site can accumulate a lot of media files over the years due to new content being added and multiple versions of the images are generated by the theme. Let me quickly show you how to delete unused images in WordPress [2024].


Divi Ad 680px

1. Delete unused images in Wordpress by hand

First, and most straightforward, we can use the tools WordPress provides, namely the Media section. Logging into WordPress, we go to "Media" >> "Library". Select "Unattached" from the drop-down menu. We will automatically be shown all media files in our WordPress site that are currently not displayed in any article or on any page. See screenshot below.

WordPress Delete Unused Images media unattached

Using the button "Bulk Select", you can then select and delete any files or images we don't consider necessary. Careful! Before you decide whether to permanently delete images, ensure that they are not being used. To be honest I prefer the next method which is saver.

2. Delete unused images in Wordpress using a plugin

It is wiser to let a plugin decide which images can be deleted. By far the best plugin for this is WP-Optimize. This free plugin removes not only all to unused images related files but also its image title, description and alt-text.

WordPress Delete Unused Images WP-Optimize

Click the "Scan Website for Unused Images" button to scan your website. WP-Optimize scans your website for any unused images, both those found in the Media Library or the "wp/content/uploads" directory. These files are not embedded or attached to any pages or posts and can savely be deleted.

All the images on your site that have been deleted will be displayed to you. You can delete the images individually by clicking on them to highlight them or click the "Select All" button to delete all of them unused images at once. See screenshot.

WordPress Delete Unused Images WP-Optimize

After you've chosen all the images that you wish to remove from your site, scroll down to choose either "Move selected images into trash" or "Delete this selection permanently". WP-Optimize will then remove all copies of the selected file and any record from the Media Library.

WordPress Delete Unused Images WP-Optimize deletion images

Other functions of this plugin are to remove unused image sizes and images can be kept in the trash. This way they can be restored at a later moment if necessary. WP-Optimize is a great plugin to delete unused images from Wordpress.


Divi Ad 680px

Scroll up