Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Statamic Imagehotspots Laravel Package

darinlarimore/statamic-imagehotspots

Statamic Image Hotspots adds a fieldtype for marking clickable hotspots on images in the control panel and exposing their coordinates and metadata in templates, making it easy to build interactive image maps, product callouts, and tooltips with Statamic assets.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install the addon with Composer, then publish any config/views if the package README instructs it.
  • Look first at the package README and the fieldtype class/service provider to confirm the supported Statamic versions and the blueprint field handle.
  • First use case: add the fieldtype to an asset-container blueprint in the Statamic Control Panel, then verify that the asset-container edit route resolves correctly on your Statamic version.
  • On 2.2.1, the fieldtype now resolves either the old or new asset-container blueprint route name, so it should work on older Statamic 5, Statamic 5.73+, and Statamic 6 without code changes.

Implementation Patterns

  • Register the fieldtype in a blueprint and point it at the intended asset container; keep blueprint YAML in version control so route/field changes are reviewable.
  • Let the package resolve the asset-container blueprint route dynamically instead of hardcoding statamic.cp.blueprints.asset-containers.edit in your own code.
  • When building custom CP integrations, use the same defensive route-resolution pattern: check for the new route name first, then fall back to the legacy name.
  • Test the same blueprint on each Statamic version in your support matrix, especially if you maintain addons or sites across Statamic 5 and 6.
  • For package extension, publish config/views if available and override presentation in your own views rather than editing vendor files.

Gotchas and Tips

  • The Route [statamic.cp.blueprints.asset-containers.edit] not defined error is fixed in 2.2.1, but cached routes and config can still mask the fix. Run php artisan route:clear and php artisan config:clear after upgrading.
  • Do not hardcode the asset-container blueprint route name in custom fieldtypes or CP nav links; Statamic 5.73 renamed it, and Statamic 6 may differ again.
  • If you override the fieldtype view or route resolution, keep the fallback logic so older Statamic 5 installs continue to work.
  • The removal of the unused machine-specific @statamic/cms npm dependency should not affect runtime behavior, but rebuild frontend assets if your project relied on that dependency being present transitively.
  • Debug route-resolution issues by dumping available route names with php artisan route:list and confirming which Statamic version is installed.
  • Extension point: use the package’s published views/config where available, and prefer named-route lookup helpers over string literals for CP routes.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource