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 Manager Laravel Package

slimani/filament-media-manager

A media manager plugin for Filament v4 and v5 with hierarchical folders, tagging, search and filtering, previews, and configurable multi-disk storage. Built natively for Filament forms, tables, and actions with a smooth, responsive browser UI and per-field or global disk settings.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • This is a presentation-layer plugin bolted onto a persistence layer. It is not a thin UI wrapper: it ships its own media_files, media_attachments, folders, and tags tables, plus an opt-in tenant_id column, and expects your domain tables to take foreign keys pointing at media_files. That means adopting it is a schema decision, not just a composer require.
  • It explicitly layers on Spatie Media Library (you are told to publish Spatie's migrations alongside its own), so you inherit two interacting schemas and two upgrade cadences for one capability.
  • Fit is strong if you are already a Filament shop on v4/v5 and your media needs are "admin-curated assets with folders and tags." Fit is weak if media is a first-class domain entity with its own lifecycle, rights, or workflow — in that case the plugin's tables become a shadow model you do not control.
  • Rich text integration is the deepest coupling: content is stored as HTML containing media IDs and re-resolved at render time via renderRichContent(). That is a reasonable design for signed-URL disks, but it means stored content is only correct when rendered through the plugin's resolver.

Integration feasibility

  • Mechanically low-friction: composer require, publish migrations, ->plugin(MediaManagerPlugin::make()), add InteractsWithMediaFiles to models, add MediaPicker / MediaColumn / infolist entries to resources. A competent Filament developer can produce a working demo in a day.
  • Real effort sits in the non-code work: deciding single-FK vs. polymorphic attachment per entity, backfilling existing files into media_files, and auditing every resource whose forms/tables touch media.
  • Custom-theme projects must patch theme.css with both @import and Tailwind @source for the plugin path — a build-pipeline change that will silently produce broken layouts if missed.

Technical risk

  • Vendor concentration. 21 stars, 0 dependents, one maintainer, single-digit release history. MIT plus a clean CI setup (tests, PHPStan, code style) makes fork-and-own viable, but assume you may own this code within 12 months.
  • Version surface. Claiming simultaneous Filament v4 and v5 support multiplies the compatibility matrix while the maintainer count stays at one. Expect lag behind Filament minor releases, especially around RichEditor internals (HasRichContent, InteractsWithRichContent) and file-attachment providers.
  • Security/tenancy gap, self-documented. Tenant scoping is database-level only; a public disk URL remains world-readable to anyone holding the URL. If tenant isolation is a compliance requirement, a private disk is mandatory — this must be an explicit architecture decision, not a config default.
  • UX instability. Multi-select requires a check icon or long-press and is explicitly "under review" (issue #18). Selection semantics may change in a minor release, invalidating training material and acceptance tests.
  • Referential behavior. nullOnDelete on media_files FKs means deleting an asset silently blanks a user's avatar/CV with no error surfaced to the operator.
  • Hidden infra dependency. Video thumbnails require FFMPEG installed on workers.

Key questions

  1. Which Filament and Laravel/PHP versions are we pinned to, and is the plugin's supported range documented? (Not stated in the excerpt — must be verified against composer.json.)
  2. Do we need single-FK relationships at all, or can we standardize on the polymorphic media_attachments path and avoid foreign keys into a vendor table?
  3. Is tenant isolation in scope? If yes, is a private disk + signed URLs acceptable for our CDN/CDN-cache strategy?
  4. What happens to ~N existing assets — backfill into media_files, or leave legacy media where it is and dual-render?
  5. Who is the named internal owner and what is the fork budget if upstream stalls?
  6. Does the plugin honor Filament policies/authorization for folders and bulk actions, or is visibility only navigation-gated?

Integration Approach

Stack fit

  • Requires PHP/Laravel on a Filament v4 or v5 panel, Spatie Media Library already acceptable to the team, and queue workers for conversions. It is a natural fit for a monolith or modular monolith admin panel; it is a poor fit for headless/API-first products or multi-framework estates where media must be consumed outside Filament.
  • Existing Spatie Media Library users get partial overlap (conversions, disks) but a different record of truth (media_files vs. media), so plan for two systems or a migration — not silent coexistence.

Migration path

  • Phase 0 (spike, ~3–5 dev-days, isolated branch): install, publish config + both migration sets, review the generated schema line by line, exercise picker, column, infolist, rich editor, and tenancy on a scratch panel. Produce a schema diff and a rollback note.
  • Phase 1: decide the record-of-truth model. If existing media is Spatie-native, write a one-way importer into media_files with an idempotency key and keep the source rows intact for a defined rollback window.
  • Phase 2: enable the plugin behind a panel-level flag; pilot on one low-risk resource (e.g. user avatar). Do not add FKs to media_files on high-value tables until Phase 3 sign-off.
  • Phase 3: broaden to forms/tables/infolists per resource; only then add non-nullable operational expectations. nullOnDelete behavior should be reviewed before any FK is treated as authoritative.
  • Phase 4: rich text integration last — it is the only piece that rewrites user-authored content, and the only piece whose rollback requires re-rendering stored HTML.
  • Rollback: unregistering the plugin is cheap; rolling back published vendor migrations is not. Take a schema snapshot before migrate and keep FK additions in a separate, revertible migration.

Compatibility

  • Verify exact constraints for Filament (^4.0|^5.0), Laravel, PHP, and Spatie Media Library versions against our lockfile before the spike, not during.
  • Custom Filament themes need the two-line CSS addition; treat this as a tracked task in the pilot, since it fails visually rather than at build time.
  • If tenancy is enabled, the published tenancy migration must be edited before running if a custom tenantColumn is used — an easy sequencing mistake to make.

Sequencing

  1. Composer constraint check and lockfile compatibility review.
  2. Spike branch: install, publish, inspect schema, smoke-test all five integration surfaces.
  3. Schema decision memo (FK vs. polymorphic, tenant column name, disk strategy).
  4. Backfill script + dry run on staging copy.
  5. Pilot resource in production behind flag.
  6. Broad resource rollout.
  7. Rich editor rollout, with a render-time regression check on existing content.

Operational Impact

Maintenance

  • Budget ongoing ownership, not just adoption: assume ~1–3 engineer-days per quarter to track Filament releases, plus a fork contingency. The presence of tests/PHPStan/CI lowers the cost of forking meaningfully — that is the main reason this is a defensible trial rather than a reject.
  • Two migration sources (plugin + Spatie) and an opt-in third (tenancy) mean upgrade reviews must include schema diffs, not just changelogs.
  • Tailwind @source paths are vendor-relative; theme refactors or vendor directory changes can silently strip utility classes.

Support

  • No SLA, no commercial backing, community-only issues. Escalation is internal. Document a "known-good fork" policy and pin the version explicitly ("slimani/filament-media-manager": "x.y.*") with no floating constraints.
  • Documentation quality is a genuine positive (README, docs/, changelog, releases, screenshots), which reduces ramp-up and support load for common questions.

Scaling

  • Row-per-file in media_files with folder trees: watch recursive folder statistics and tree loading as folder count grows into the thousands; these are the likely first performance cliffs. Load-test with a realistic folder count, not 20 folders.
  • Conversions require queue capacity; thumbnail generation is the classic backlog generator on bulk upload. Size workers before the first bulk import, and gate video thumbnails behind FFMPEG availability.
  • renderRichContent() resolves signed URLs at render time — fine for correctness, potentially expensive on long documents or list views with many rich-text columns. Cache or pre-render if it lands on hot pages.
  • Storage egress and CDN behavior differ sharply between public and private disks; signed URLs largely defeat CDN caching, so disk choice is a cost decision as much as a security one.

Failure modes

  • Silent reference loss: deleting a media record nulls avatar_id/cv_id with no operator-visible error.
  • Private-asset exposure: tenancy enabled but public disk configured → cross-tenant access by URL.
  • Broken previews: missing FFMPEG, misconfigured disk, or conversion worker backlog.
  • Expired-link rendering: any path that renders stored rich HTML without renderRichContent() will emit dead image URLs on private disks.
  • Migration collision: publishing into a database that already has Spatie tables or a conflicting media naming convention.
  • Theme regression: missing @import/@source producing a visually broken but functionally "passing" panel.

Ramp-up

  • Mid-level Filament developer: ~0.5 day to ship a first picker/column, ~2–3 days to be productive across rich editor and tenancy. Requires existing familiarity with Filament form/table APIs and Spatie Media Library concepts.
  • Add ~1 day of admin/ops training for the folder-and-tag model and multi-select interaction, and re-train if selection semantics change per issue #18.
  • Recommend positioning this as a trial-tier dependency: pilot one resource, pin the version, name an owner, and set a 90-day review gate covering upstream activity, Filament version lag, and whether the media_files schema has become load-bearing.
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.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle