Track where your Statamic assets are used to make moving, replacing and deleting assets quick and easy.
This package is based on using a database. It doesn't matter if you use the database for Statamic or not, but AssetAtlas tracks all asset references in entries, terms, global-sets and users as database records. This can be a simple SQLite database as it is preset in current Laravel installations.
Install the package:
composer require visuellverstehen/statamic-asset-atlasPublish and run the required migration:
php artisan vendor:publish --tag=asset_atlas_migrations
php artisan migrateNow whenever you save an item that relates to an asset, the reference is tracked in AssetAtlas. On moving, deleting or replacing an asset, AssetAtlas provides all references to the asset instead of the base Statamic logic of checking all possible items.
You can (and should) initialise the atlas using this command:
php please asset-atlas:scanAs records will be updated, you can use this command regularly to keep AssetAtlas up to date. Note that this command currently doesn't remove unused references. However, you can clear the atlas before scanning by using the reset parameter:
php please asset-atlas:scan --reset
# Use (the) force if you don't want to bother with confirmation dialogues:
php please asset-atlas:scan --reset --forceAt visuellverstehen we create innovative digital and design solutions with a special focus on the common good. With technical expertise, high creativity and strategic skills, we develop products with a personal character.
The MIT license (MIT). Please take a look at the license file for more information.