PHPackages                             juniyasyos/filament-media-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. juniyasyos/filament-media-manager

ActiveLibrary[Image &amp; Media](/categories/media)

juniyasyos/filament-media-manager
=================================

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

3.0(2mo ago)06981MITPHPPHP ^8.2

Since Mar 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/juniyasyos/filament-media-manager)[ Packagist](https://packagist.org/packages/juniyasyos/filament-media-manager)[ RSS](/packages/juniyasyos-filament-media-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (21)Used By (1)

[![Screenshot](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/3x1io-tomato-media-manager.jpg)](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/3x1io-tomato-media-manager.jpg)

Filament media manager
======================

[](#filament-media-manager)

[![Latest Stable Version](https://camo.githubusercontent.com/ac523274adee605fd5df4b6418832221f4b72a1570036286f6ab766ed31da6dc/68747470733a2f2f706f7365722e707567782e6f72672f6a756e69796173796f732f66696c616d656e742d6d656469612d6d616e616765722f76657273696f6e2e737667)](https://packagist.org/packages/juniyasyos/filament-media-manager)[![License](https://camo.githubusercontent.com/07f6191f5559f0e7e9ec9d166226e636a11d7e3d03c2a1ed05b11969b50674d9/68747470733a2f2f706f7365722e707567782e6f72672f6a756e69796173796f732f66696c616d656e742d6d656469612d6d616e616765722f6c6963656e73652e737667)](https://packagist.org/packages/juniyasyos/filament-media-manager)[![Downloads](https://camo.githubusercontent.com/5bb5c0a7a235a620b9d0418abbae20cc1f18fbeeba0cadc27b98d35955c72699/68747470733a2f2f706f7365722e707567782e6f72672f6a756e69796173796f732f66696c616d656e742d6d656469612d6d616e616765722f642f746f74616c2e737667)](https://packagist.org/packages/juniyasyos/filament-media-manager)

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

Installation
------------

[](#installation)

```
composer require juniyasyos/filament-media-manager
```

after install your package please run this command

```
php artisan filament-media-manager:install
```

finally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`, if you like to use GUI and Folder Browser.

```
->plugin(\Juniyasyos\FilamentMediaManager\FilamentMediaManagerPlugin::make())
```

Features
--------

[](#features)

- Manage your media files using spatie media library
- Create folders and subfolders
- Set password for folders
- Upload Files with Custom Fields using `->schema()`
- Auto Create Folders for Model/Collection/Record
- RTL/Mutli Language Support

Screenshots
-----------

[](#screenshots)

[![Folders](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/folders.png)](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/folders.png)[![Folder Password](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/folder-password.png)](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/folder-password.png)[![Media](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/media.png)](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/media.png)[![Media Inputs](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/media-input.png)](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/media-input.png)[![Media Component](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/media-component.png)](https://raw.githubusercontent.com/juniyasyos/filament-media-manager/master/arts/media-component.png)

Usage
-----

[](#usage)

you can use the media manager by add this code to your filament component

```
use Juniyasyos\FilamentMediaManager\Form\MediaManagerInput;

public function form(Form $form)
{
    return $form->schema([
        MediaManagerInput::make('images')
            ->disk('public')
            ->schema([
                Forms\Components\TextInput::make('title')
                    ->required()
                    ->maxLength(255),
                Forms\Components\TextInput::make('description')
                    ->required()
                    ->maxLength(255),
            ]),
    ]);
}
```

Add Custom Preview to selected type on the media manager
--------------------------------------------------------

[](#add-custom-preview-to-selected-type-on-the-media-manager)

you can add custom preview to selected type on the media manager by add this code to your provider

```
use Juniyasyos\FilamentMediaManager\Facade\FilamentMediaManager;
use Juniyasyos\FilamentMediaManager\Services\Contracts\MediaManagerType;

public function boot() {
     FilamentMediaManager::register([
        MediaManagerType::make('.pdf')
            ->icon('bxs-file-pdf')
            ->preview('media-manager.pdf'),
    ]);
}
```

on your view file you can use it like this

```

    #the-canvas {
        border: 1px solid black;
        direction: ltr;
    }

    // If absolute URL from the remote server is provided, configure the CORS
    // header on that server.
    var url = "{{ $url }}";

    // Loaded via  tag, create shortcut to access PDF.js exports.
    var { pdfjsLib } = globalThis;

    // The workerSrc property shall be specified.
    pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.mjs';

    // Asynchronous download of PDF
    var loadingTask = pdfjsLib.getDocument(url);
    loadingTask.promise.then(function(pdf) {

        // Fetch the first page
        var pageNumber = 1;
        pdf.getPage(pageNumber).then(function(page) {
            var scale = 1;
            var viewport = page.getViewport({scale: scale});

            // Prepare canvas using PDF page dimensions
            var canvas = document.getElementById('the-canvas');
            var context = canvas.getContext('2d');
            canvas.height = viewport.height;
            canvas.width = viewport.width;

            // Render PDF page into canvas context
            var renderContext = {
                canvasContext: context,
                viewport: viewport
            };
            var renderTask = page.render(renderContext);
        });
    }, function (reason) {
        // PDF loading error
        console.error(reason);
    });

```

you can attach global `js` or `css` file to the media manager by add this code to your provider

```
use Juniyasyos\FilamentMediaManager\Facade\FilamentMediaManager;
use Juniyasyos\FilamentMediaManager\Services\Contracts\MediaManagerType;

public function boot() {
     FilamentMediaManager::register([
        MediaManagerType::make('.pdf')
            ->js('https://mozilla.github.io/pdf.js/build/pdf.mjs'),
            ->css('https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.3.136/pdf_viewer.min.css'),
            ->icon('bxs-file-pdf')
            ->preview('media-manager.pdf'),
    ]);
}
```

please note that the `name ` of the component will be the same name of the collection.

Allow Sub Folders
-----------------

[](#allow-sub-folders)

you can allow create and manage subfolders on your media manager on `/app/Providers/Filament/AdminPanelProvider.php`

```
->plugin(
    \Juniyasyos\FilamentMediaManager\FilamentMediaManagerPlugin::make()
        ->allowSubFolders()
)
```

Allow User Access
-----------------

[](#allow-user-access)

now you can allow user to access selected folder and restract user to access each other folders if the folder is not public on `/app/Providers/Filament/AdminPanelProvider.php`

```
->plugin(
    \Juniyasyos\FilamentMediaManager\FilamentMediaManagerPlugin::make()
        ->allowUserAccess()
)
```

now on your user model you can use this trait to allow user to access selected folder

```
use Juniyasyos\FilamentMediaManager\Traits\InteractsWithMediaFolders;

class User extends Authenticatable
{
    use InteractsWithMediaFolders;
}
```

**NOTE** don't forget to migrate after update the plugin

Folders API
-----------

[](#folders-api)

now you can access your media and folders using API you have 2 endpoints

- `/api/folders` to get all folders
- `/api/folders/{id}` to get folder by id with sub folders and media files

to allow this feature you need to publish the config file by use this command

```
php artisan vendor:publish --tag="filament-media-manager-config"
```

then you can set `api.active` to `true` on the config file

```
'api' => [
    "active" => true,
],
```

Publish Assets
--------------

[](#publish-assets)

you can publish config file by use this command

```
php artisan vendor:publish --tag="filament-media-manager-config"
```

you can publish views file by use this command

```
php artisan vendor:publish --tag="filament-media-manager-views"
```

you can publish languages file by use this command

```
php artisan vendor:publish --tag="filament-media-manager-lang"
```

you can publish migrations file by use this command

```
php artisan vendor:publish --tag="filament-media-manager-migrations"
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance88

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Total

18

Last Release

52d ago

Major Versions

v1.3.9 → 3.02026-03-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/13dafb0bb45c4dbf74b7d4a75e9e1d2c335fcaa1fb4e32f135ac4fb4fee5f1aa?d=identicon)[Ahmad Ilyas](/maintainers/Ahmad%20Ilyas)

---

Top Contributors

[![juniyasyos](https://avatars.githubusercontent.com/u/111669845?v=4)](https://github.com/juniyasyos "juniyasyos (24 commits)")

---

Tags

phpspatielaravelmanagermediamedia libraryfilament

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/juniyasyos-filament-media-manager/health.svg)

```
[![Health](https://phpackages.com/badges/juniyasyos-filament-media-manager/health.svg)](https://phpackages.com/packages/juniyasyos-filament-media-manager)
```

###  Alternatives

[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[tomatophp/filament-alerts

Send notification to users using notification templates and multi notification channels, it's support Filament Native Notification Service with macro, and a full integration to FCM service worker notifications

7910.8k3](/packages/tomatophp-filament-alerts)[tomatophp/filament-types

Manage any type on your app in Database with easy to use Resource for FilamentPHP

5616.7k8](/packages/tomatophp-filament-types)[tomatophp/filament-plugins

Manage your modules as a plugin system with plugin generator

644.7k2](/packages/tomatophp-filament-plugins)[raugadh/fila-starter

Laravel Filament Starter.

614.9k](/packages/raugadh-fila-starter)[webplusm/gallery-json-media

a filament media storing in a Json field

196.0k](/packages/webplusm-gallery-json-media)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
