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
Filament Media Library

Filament Media Library Laravel Package

codedor/filament-media-library

Filament Media Library gives your admin panels a full media manager: upload, browse, search, and organize files, then attach them to your models via Spatie Media Library. Includes a reusable picker, image conversions, and a clean, native Filament UI.

View on GitHub
Deep Wiki
Context7

Filament package for attachments

Frequently asked questions about Filament Media Library
How do I install codedor/filament-media-library in a Laravel Filament app?
Install it with composer require codedor/filament-media-library, then register the plugin in your panel provider's plugin array. Publish any config or assets the package exposes and clear your config cache. If you are not already using Spatie Media Library, set up its migrations and disk configuration first, since this package is a UI and attachment layer on top of it. After that, run a quick upload and attach smoke test in a local panel before rolling out.
Does this package require Spatie Media Library?
Yes. Filament Media Library layers a media manager UI and attachment management over Spatie's laravel-medialibrary, so your models should use Spatie's InteractsWithMedia trait. Teams already on Spatie Media Library get the most value because there is no data model migration to adopt. Non-Filament Laravel apps or apps without Spatie should not adopt this package.
Which Filament versions does this media library plugin support?
Compatibility is driven by the composer constraint in the release you install, so check it against your panels' Filament and PHP versions before merging. Filament major-version compatibility, not the small 4.7.0 changes, is the main feasibility gate for adoption. Pin the version you validate and re-check the constraint on every upgrade.
How do I attach uploaded media to my Eloquent models with this package?
The package provides a reusable media picker for Filament forms plus attachment management backed by Spatie Media Library, so selected files are stored through Spatie's media collections. Add the picker to your form schema and read the relationship as you would with any Spatie media association. For existing Spatie adopters, no schema change is required to start attaching files.
Can I use the media picker outside the package's own pages?
Yes. The picker is designed as a reusable Filament form component, so you can drop it into your own resources, custom pages and relation managers. It renders inside Filament's native asset and table UI, which keeps styling consistent with the rest of your panel. Test it in your own form layouts, since app-level CSS overrides can affect the grid.
How do I use a custom attachment model with Filament Media Library?
Version 4.7.0 adds a config-driven attachment model, so you can point the config at a subclass instead of forking the package. The subclass should mirror the base model's table, fillable, casts and media relationships so package internals keep working. Policies and observers that target the base class must be registered explicitly for the subclass. This is an opt-in change with a higher blast radius than the grid update.
Does the package support image conversions and thumbnails?
Yes. Filament Media Library includes image conversions and a thumbnail fallback in the media grid, so broken images degrade to a placeholder instead of a collapsed card. The 4.7.0 grid work also adds responsive breakpoints and titles for better layout at scale. Check the package config to see which of these presentation details you can override before hard-coding CSS.
Is upgrading from 4.6.1 to 4.7.0 safe in production?
It is a semver-minor bump, so composer update should suffice and no database migration is expected for the grid changes. Roll out the presentation-only grid update first, then adopt the configurable attachment model behind a feature flag if you need it. Run your existing test suite plus a media CRUD smoke test, and do visual QA at all breakpoints in staging because app CSS overrides and snapshot tests can break.
How do I test media uploads and attachments with this package?
Use Laravel's UploadedFile::fake() and Spatie Media Library's testing helpers to assert that files land in the expected collections and disks. Cover the picker inside a Filament form test, then assert the resulting media records and conversions. If you configure a custom attachment model, add a test that confirms the container resolves your subclass and that policies and observers still apply.
What are the alternatives and maintenance risks for this package?
The closest alternative is wiring Spatie Media Library directly into Filament with your own custom form fields, or choosing another Filament media manager plugin. This is a community package with a single active maintainer, so single-maintainer risk is real for a core admin dependency: pin the version and be ready to vendor-fork if upstream stalls. Ongoing cost is low and mainly involves tracking Filament major bumps rather than this package's minor releases.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections