Search by

majid-shafik / filament-media-library

Majid-Shafik

An advanced, secure, and modern centralized Media Library plugin for Filament 5 with SHA-256 deduplication, hierarchical category tree, usage tracking, and native RTL support.

Package info

github.com/Majid-Shafik/filament-media-library

pkg:composer/majid-shafik/filament-media-library

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.3 2026-10-21 18:36 UTC

This package is auto-updated.

Last update: 2026-10-21 18:36:23 UTC


README

Filament Media Library Banner

Latest Version on Packagist Total Downloads License

An advanced, secure, and modern centralized Media Library Plugin for Filament 5 featuring:

  • 🚀 SHA-256 Deduplication: Automatic byte-level fingerprinting to prevent uploading duplicates and save disk storage.
  • 🌳 Hierarchical Categories Tree: Interactive folder organization with cyclic recursion protection.
  • 🛡️ Deep Security Sanitization: Magic byte signatures, GD re-encoding to strip malicious EXIF/payloads, and decompression bomb protection.
  • 🔗 Smart Usages Tracking: Prevent breaking links by tracking where media is used across content, sections, and page builder blocks.
  • ⚡ Native RTL & Arabic Support: Built from the ground up for modern enterprise workflows with full RTL ergonomics.

📸 Screenshots & Showcase

1. Centralized Media Library & Upload Management (مكتبة الوسائط ورفع الملفات)

Full interactive asset browser with live grid previews, folder filtering, instant secure upload, favorite toggle, and comprehensive usage tracking:

Media Library Management

2. Hierarchical Categories Tree (إدارة شجرة التصنيفات الهرمية)

Organize and structure media assets into flexible multi-level categories with cyclic recursion protection and quick action controls:

Categories Management

📦 Installation

You can install the package via composer:

composer require majid-shafik/filament-media-library

Publish and run the migrations:

php artisan vendor:publish --tag=filament-media-library-migrations
php artisan migrate

Optionally publish the config file:

php artisan vendor:publish --tag=filament-media-library-config

🚀 Registering with Filament Panel

Register the plugin in your AdminPanelProvider:

use MajidShafik\FilamentMediaLibrary\FilamentMediaLibraryPlugin;
use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugins([
            FilamentMediaLibraryPlugin::make(),
        ]);
}

🎨 Form Component Usage

Use MediaImagePicker directly inside any Filament Form, Infolist, or PageBuilder Block:

use MajidShafik\FilamentMediaLibrary\Components\MediaImagePicker;

MediaImagePicker::make(
    imagePathField: 'image',
    mediaIdField: 'image_media_id',
    label: 'الصورة البارزة',
    directory: 'uploads/contents',
    required: true,
)

🛠️ Console Commands

To calculate SHA-256 fingerprints for legacy media:

php artisan media:backfill-hashes --all

📄 License

The MIT License (MIT). Please see License File for more information.