slimani/filament-media-manager
Filament Media Manager for Filament v4/v5: folder-based media library with smooth browser UI, hierarchical tree navigation, tagging, search/filtering, and multi-disk support. Integrates with Filament forms, tables, and actions.
MediaLibrary under the hood, providing a robust foundation for media handling while exposing a Filament-specific API. This modularity allows for future upgrades or replacements of the underlying storage layer without breaking Filament-specific features.InteractsWithMediaFiles trait abstracts media relationships, enabling consistent behavior across models while allowing customization (e.g., polymorphic attachments). This fits well with Laravel’s Eloquent conventions.spatie/laravel-medialibrary (v11+) and filament/select-tree (for folder navigation). Both are well-maintained and widely adopted, reducing integration risk.MediaLibrary, but disk configuration must be pre-configured in config/filesystems.php.RichEditor, but requires additional setup (e.g., HasRichContent trait) for dynamic URL resolution. This adds complexity for non-RichEditor use cases.MediaLibrary), which may conflict with existing database schemas. Teams with custom media tables may face integration challenges.MediaLibrary caching) should be evaluated.Storage Strategy:
Filament Version:
Media Volume:
Video Support:
Customization Needs:
RichEditor Dependency:
Backup/Recovery:
MediaLibrary backups vs. custom solutions)?Access Control:
MediaLibrary. The InteractsWithMediaFiles trait integrates cleanly with existing model relationships.MediaPicker and MediaColumn mirror Filament’s native patterns.@source directive ensures utility classes are scanned.Prerequisites:
composer require slimani/filament-media-manager spatie/laravel-medialibrary filament/select-tree
config/filesystems.php for the target storage disk.Database Setup:
php artisan vendor:publish --tag="media-manager-migrations"
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider" --tag="medialibrary-migrations"
php artisan migrate
Plugin Registration:
PanelProvider:
->plugin(MediaManagerPlugin::make())
Model Integration:
InteractsWithMediaFiles trait to models requiring media relationships.avatar_id, documents()) and update migrations if using foreign keys.UI Integration:
MediaPicker in Forms.ImageColumn/FileColumn with MediaColumn in Tables.HasRichContent and configure the MediaManagerRichContentPlugin.Testing:
@source directive for utility classes. May need adjustments for heavily customized themes.spatie/laravel-medialibrary and filament/select-tree for breaking changes.MediaLibrary tools.media_files and media_attachments tables).spatie/laravel-medialibrary).renderRichContent() is used in Infolists).MediaLibrary logging (config/medialibrary.php).MediaLibrary docs for low-level issues.How can I help you explore Laravel packages today?