aryehraber/statamic-splash
Statamic Splash is a Statamic addon for adding a customizable splash screen to your site. Use it for coming-soon pages, launches, or announcements, with Control Panel settings to manage content and toggle visibility—no code required.
composer require aryehraber/statamic-splash. Statamic auto-discovers the addon via its service provider — no manual registration in config/app.php.unsplash.com/developers and grab the Access Key (not the secret). The free “Demo” tier is limited to ~50 requests/hour; request production access for real work.php artisan vendor:publish and pick the Splash provider), then put credentials in .env:
UNSPLASH_ACCESS_KEY=your_access_key
php artisan config:clear && php artisan statamic:stache:clear.vendor/aryehraber/statamic-splash/:
config/splash.php (or similar) — API key, default asset container, image size/quality optionssrc/ServiceProvider.php — what gets registered (fieldtype, CP nav, routes)src/Fieldtypes/ — how the CP picker is wired to Statamicresources/js/ — the Vue component behind the CP UIhero_image field on a Page collection) and pick an Unsplash photo directly from the publish form. Alternatively, use the CP nav entry to browse and import into an asset container, then reference the resulting asset normally.Blueprint field pattern (most common). Add the addon’s fieldtype handle to a blueprint YAML:
fields:
hero_image:
type: splash # verify exact handle in the addon's fieldtype class
display: Hero Image
container: assets # target asset container for the imported file
The field stores the imported asset reference, so your Antlers/Blade templates treat it like any other asset:
{{ hero_image }}
<img src="{{ url }}" alt="{{ alt }}" width="{{ width }}" height="{{ height }}">
{{ /hero_image }}
Import-into-container workflow. Configure a default asset container so picked photos land somewhere predictable (assets/images/unsplash/…). This keeps the asset browser consistent and means the CP selection survives if the Unsplash API is down later — you own a local copy.
Search-then-download pattern. Use the CP browser for discovery, but drive the actual download through Unsplash’s links.download_location trigger if you’re building programmatic imports. Skipping that endpoint is a terms-of-service violation, not just a nicety.
Programmatic access. If the addon exposes a service/API wrapper, inject it rather than calling Unsplash directly, so caching and credentials stay in one place:
public function __construct(private Splash $splash) {}
public function photos(string $query): array
{
return Cache::remember("splash:{$query}", now()->addHour(), fn () => $this->splash->search($query));
}
Cache aggressively — search results don’t change minute-to-minute, and you’ll burn the demo quota fast otherwise.
Editor workflow. For content teams, pair Splash with a normal asset field: Splash for initial selection, then editors can swap the asset later without re-hitting the API. Document this in your editor guide so people don’t assume every image must come from Unsplash.
Multi-site. Imported assets live in the container, so they’re shared across sites by default. If you need per-site hero images, keep the Splash field inside a localized fieldset or use site-specific fields rather than one global picker.
Extension points. Rather than forking, extend via:
photographer_name and photographer_url alongside it (often as asset meta or a separate field) and render attribution near the image.download_location when a user “downloads” an image. A raw images.unsplash.com fetch into your container technically doesn’t count. Check whether the addon does this; if not, add it in your own import path.env('UNSPLASH_ACCESS_KEY') — keep it that way, and remember php artisan config:cache in production means env changes require a re-cache.php artisan statamic:stache:clear (or stache:warm).composer.json and check the README for the supported Statamic major (v3/v4/v5 fieldtype APIs differ). Test upgrades in a staging branch.image-1.jpg, image-2.jpg clutter. Standardize the destination folder and consider a deterministic filename based on the Unsplash photo ID if you customize the import.storage/logs/laravel.log for API errors; use php artisan tinker to hit the addon’s service directly and isolate whether a failure is API-side or fieldtype-side; inspect the network tab in the CP to see the actual Unsplash request and response code.vendor:publish won’t overwrite. Use --force deliberately and diff first.How can I help you explore Laravel packages today?