Search by

visuellverstehen / statamic-asset-atlas

visuellverstehensimonerd

Track where your Statamic assets are used to make moving, replacing and deleting them quick and easy.

Package info

github.com/visuellverstehen/statamic-asset-atlas

Type:statamic-addon

pkg:composer/visuellverstehen/statamic-asset-atlas

Statistics

Installs: 40 969

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 1

v0.7.0 2026-11-23 08:29 UTC

README

Track where your Statamic assets are used to make moving, replacing and deleting assets quick and easy.

Requirements

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.

How to use

Install the package:

composer require visuellverstehen/statamic-asset-atlas

Publish and run the required migration:

php artisan vendor:publish --tag=asset_atlas_migrations
php artisan migrate

Now 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:scan

As 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 --force

Working copies

If a collection has revisions enabled, AssetAtlas also tracks the assets used in working copies, including assets that only the working copy uses. Moving, replacing or deleting an asset updates the working copy together with its entry. Run php please asset-atlas:scan once after updating, so existing working copies get indexed.

Working copy references are stored with the item type working_copy. AssetAtlas::find() without an item type returns them too, so an entry can appear twice there. findAll() deduplicates by item and includes entries referenced only by a working copy. findEntries() ignores working copies.

Statamic versions

AssetAtlas supports Statamic 5 only. Support for Statamic 6 is not planned.

More about us

At 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.

License

The MIT license (MIT). Please take a look at the license file for more information.