https://github.com/born05/craft-assetusage
Craft plugin adds a column to see which assets are used or unused.
https://github.com/born05/craft-assetusage
craftcms craftcms-plugin
Last synced: about 1 year ago
JSON representation
Craft plugin adds a column to see which assets are used or unused.
- Host: GitHub
- URL: https://github.com/born05/craft-assetusage
- Owner: born05
- License: mit
- Created: 2016-12-30T09:53:03.000Z (over 9 years ago)
- Default Branch: craft5
- Last Pushed: 2024-09-24T13:58:41.000Z (over 1 year ago)
- Last Synced: 2025-03-29T09:09:47.164Z (about 1 year ago)
- Topics: craftcms, craftcms-plugin
- Language: PHP
- Homepage:
- Size: 70.3 KB
- Stars: 33
- Watchers: 8
- Forks: 8
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Craft Asset Usage plugin
Adds a column to the assets overview to see which assets are used or unused. For Craft 4.
The "Usage" field shows all relations and the "Current Usage" field shows relations excluding revisions and deleted elements.
## Setup
- Go to `admin/assets`
- Click the "sprocket" icon
- Check the "Usage" or "Current Usage" column
- Save
- The assets table should now show a "Usage" or "Current Usage" column indicating usage
## Settings
The setting values can be overridden from a PHP file within your project’s `config/` folder, named `assetusage.php`.
The file just needs to return an array with the overridden values:
```php
false,
'renderUsedByInAssetDetail' => true,
];
```
### Support
- Everything using an asset field or the relations table, including matrix fields
- SuperTable
### Does NOT support (assets not connected through relations table)
- LinkIt
- Redactor
- ether/seo
## Commandline usage
```sh
craft assetusage/default/delete-unused # Deletes all unused assets.
craft assetusage/default/list-unused # Lists all unused assets.
```
## License
Copyright © [Born05](https://www.born05.com/)
See [license](https://github.com/born05/craft-assetusage/blob/master/LICENSE.md)