crumbls/filament-media-library
A Filament media library manager for browsing, uploading, searching, and organizing files with folders. Integrates with Spatie Media Library so you can attach and reuse images and documents from a clean, native Filament interface.
The package targets PHP 8.3+, Laravel 12/13, and Filament 5 as of 1.3.0 — verify these in composer.json before adding it to a legacy Laravel 10/11 app, since the constraint bump in this release is a hard floor.
Minimal setup:
composer require crumbls/filament-media-libraryphp artisan vendor:publish --tag="filament-media-library-migrations" then php artisan migrate. Re-publish the config if you already had it published — new keys are silently missing otherwise.Post).app/Providers/Filament/*PanelProvider.php — not globally, since 1.3.0 adds explicit coverage for panel authentication and tenant scoping.php artisan storage:link and confirm the disk in the config exists.First use case: attach an image to a Post from a Filament form, then render it in the resource table. That single flow exercises the upload → media record → conversion/URL path and will surface any disk or queue misconfiguration immediately.
Where to look first: the config file (disk, conversions, accepted mime types), then the resource/table component registration, then the migration to confirm the media table's column names before you write queries against it.
Panel-scoped registration. Register the plugin inside the panel you need, and let the package's auth checks govern access. Because 1.3.0 adds panel-authentication test coverage, the expectation is that media browsing respects the panel's guard — don't hand-roll a second authorization layer on top, but do verify it against your non-default guard if you have one.
Tenant-aware media. With tenancy enabled on the panel, the media table filters to the current tenant. Add a tenant_id (or your scoping key) to the media table and populate it in the owning model's save path, or rely on the package's scoping if it manages the column for you. Test tenant switching explicitly — this is the highest-risk area for cross-tenant leakage.
Model-centric attachment. Treat media as owned by an Eloquent model rather than as standalone uploads. Conversions, responsive URLs, and cleanup then follow the model lifecycle, and cascade deletes are the model's concern rather than something you wire by hand.
Post-upload processing via events. Use the package's events to trigger downscaling, AI tagging, or CDN purging rather than putting that work in the form's afterCreate. Keep listeners queued; uploads are already the slow path.
Validation at the edge. Rely on the package's file validation for mime/size, and layer your own Rule objects for business constraints. Validate in the form and in the model/action layer if media can be attached outside Filament (API, imports) — the Filament validation only covers Filament.
Testing pattern. 1.3.0's harness coverage (media table, auth, events, validation, tenancy) is a good template: use Livewire::test() against the media table and form components, Storage::fake() for the disk, and Event::fake() to assert post-upload events fire. Copy the shapes from the package's own tests rather than inventing them.
^1.2 if you can't move PHP yet.queue:work looks identical to "the plugin is broken." Check failed_jobs first.How can I help you explore Laravel packages today?