Plugin screenshot thumbnail 1/2
Plugin screenshot thumbnail 2/2

Delete Unused Assets is a simple plugin allowing you to optimize your project by deleting all unused assets in one click.

It can also detect which assets are used only in a draft or in a revision to let you the opportunity to delete them as well.

The plugin checks the relations table to determine if an asset is used ("related to") anything.

Updates and accessibility:

The plugin now features an autoscan that is safely triggered if an Asset is added or removed from a given volume since your last visit on the plugin page. More information in the documentation!
You can now change the default colors for the assets usage display.

Disclaimer

The plugin checks the relations table, so it should work in almost every cases.

However, and even though the plugin has been thoroughly tested with Craft, Craft Commerce, and most typical Craft installations, it still involves the hard deletion of content, you should therefore use it with caution.

We strongly advise you to have backups of your data, assets, and database in case anything goes wrong.

If any third-party plugin or custom code uses assets from your volumes without recording the relation in the Craft database, you *will* permanently lose them.

Additionally, if the volume from which you want to delete assets is shared by other users, softwares or Craft installations (i.e a staging installation sharing an Amazon S3 volume with the production environment), the plugin will check for relations with the database linked to the project from which it is run. This means it may delete assets that are potentially used elsewhere.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
39
Version
2.0.1
License
MIT
Compatibility
Craft 4
Last release
December 15, 2023
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs