PHPackages                             finller/filament-media-plugin - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. finller/filament-media-plugin

Abandoned → [elegantly/filament-media-plugin](/?search=elegantly%2Ffilament-media-plugin)Library[File &amp; Storage](/categories/file-storage)

finller/filament-media-plugin
=============================

Filament support for `elegantly/laravel-media`.

v5.0.0(3mo ago)12.0k1MITPHPPHP ^8.2

Since Jan 9Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/ElegantEngineeringTech/filament-laravel-media)[ Packagist](https://packagist.org/packages/finller/filament-media-plugin)[ Docs](https://github.com/ElegantEngineeringTech/filament-laravel-media)[ RSS](/packages/finller-filament-media-plugin/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (27)Used By (0)

Filament Elegantly Media Plugin
===============================

[](#filament-elegantly-media-plugin)

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

[](#installation)

Install the plugin with Composer:

```
composer require elegantly/filament-media-plugin:"^4.0" -W
```

If you haven't already done so, you need to publish the migration to create the media table:

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

Run the migrations:

```
php artisan migrate
```

You must also [prepare your Eloquent model](https://github.com/ElegantEngineeringTech/laravel-media#basic-usage) for attaching media.

> For more information, check out the [documentation](https://github.com/ElegantEngineeringTech/laravel-media).

Form component
--------------

[](#form-component)

You may use the field in the same way as the [original file upload](https://filamentphp.com/docs/forms/file-upload) field:

```
use Filament\Forms\Components\ElegantlyMediaFileUpload;

ElegantlyMediaFileUpload::make('avatar')
```

The media file upload supports all the customization options of the [original file upload component](https://filamentphp.com/docs/forms/file-upload).

### Passing a collection

[](#passing-a-collection)

Optionally, you may pass a [`collectionName()`](https://github.com/ElegantEngineeringTech/laravel-media#defining-media-collections) allows you to group files into categories:

```
use Filament\Forms\Components\ElegantlyMediaFileUpload;

ElegantlyMediaFileUpload::make('avatar')
    ->collectionName('avatars')
```

### Configuring the storage disk and directory

[](#configuring-the-storage-disk-and-directory)

By default, files will be uploaded publicly to your storage disk defined in the collection.

Alternatively, you can manually set the disk with the `disk()` method:

```
use Filament\Forms\Components\ElegantlyMediaFileUpload;

ElegantlyMediaFileUpload::make('attachment')
    ->disk('s3')
```

### Reordering files

[](#reordering-files)

In addition to the behavior of the normal file upload, Elegantly's Media also allows users to reorder files.

To enable this behavior, use the `reorderable()` method:

```
use Filament\Forms\Components\ElegantlyMediaFileUpload;

ElegantlyMediaFileUpload::make('attachments')
    ->multiple()
    ->reorderable()
```

You may now drag and drop files into order.

### Adding metadata

[](#adding-metadata)

You may pass in \[metadata\] when uploading files using the `metadata()` method:

```
use Filament\Forms\Components\ElegantlyMediaFileUpload;

ElegantlyMediaFileUpload::make('attachments')
    ->multiple()
    ->metadata(['zip_filename_prefix' => 'folder/subfolder/'])
```

### Using conversions

[](#using-conversions)

You may also specify a `conversionName()` to load the file from showing it in the form, if present:

```
use Filament\Forms\Components\ElegantlyMediaFileUpload;

ElegantlyMediaFileUpload::make('attachments')
    ->conversionName('thumb')
```

### Filtering media

[](#filtering-media)

It's possible to target a file upload component to only handle a certain subset of media in a collection. To do that, you can filter the media collection using the `filterMediaUsing()` method. This method accepts a function that receives the `$media` collection and manipulates it. You can use any [collection method](https://laravel.com/docs/collections#available-methods) to filter it.

For example, you could scope the field to only handle media that has certain custom properties:

```
use Filament\Schemas\Components\Utilities\Get;
use Filament\Forms\Components\ElegantlyMediaFileUpload;
use Illuminate\Support\Collection;

ElegantlyMediaFileUpload::make('images')
    ->metadata(fn (Get $get): array => [
        'gallery_id' => $get('gallery_id'),
    ])
    ->filterMediaUsing(
        fn (Collection $media, Get $get): Collection => $media->where(
            'metadata.gallery_id',
            $get('gallery_id')
        ),
    )
```

### Using media for rich editor file attachments

[](#using-media-for-rich-editor-file-attachments)

You can use media to store file attachments in the [rich editor](https://filamentphp.com/docs/forms/rich-editor). To do this, you must [register a rich content attribute](https://filamentphp.com/docs/forms/rich-editor#registering-rich-content-attributes) on your model, similar to how a media library collection is registered. You should call `fileAttachmentProvider()` on the attribute registration, passing in a `ElegantlyMediaFileAttachmentProvider::make()` object:

```
use Filament\Forms\Components\RichEditor\FileAttachmentProviders\ElegantlyMediaFileAttachmentProvider;
use Filament\Forms\Components\RichEditor\Models\Concerns\InteractsWithRichContent;
use Filament\Forms\Components\RichEditor\Models\Contracts\HasRichContent;
use Illuminate\Database\Eloquent\Model;

class Post extends Model implements HasRichContent
{
    use InteractsWithRichContent;

    public function setUpRichContent(): void
    {
        $this->registerRichContent('content')
            ->fileAttachmentsProvider(ElegantlyMediaFileAttachmentProvider::make());
    }
}
```

A media collection with the same name as the attribute (`content` in this example) will be used for the file attachments. The collection must not contain any other media apart from file attachments for that attribute, since Filament will clear any unused media from the collection when the model is saved. To customize the name of the collection, you can pass it to the `collectionName()` method of the provider:

```
use Filament\Forms\Components\RichEditor\FileAttachmentProviders\ElegantlyMediaFileAttachmentProvider;
use Filament\Forms\Components\RichEditor\Models\Concerns\InteractsWithRichContent;
use Filament\Forms\Components\RichEditor\Models\Contracts\HasRichContent;
use Illuminate\Database\Eloquent\Model;

class Post extends Model implements HasRichContent
{
    use InteractsWithRichContent;

    public function setUpRichContent(): void
    {
        $this->registerRichContent('content')
            ->fileAttachmentsProvider(
                ElegantlyMediaFileAttachmentProvider::make()
                    ->collectionName('content-file-attachments'),
            );
    }
}
```

Table column
------------

[](#table-column)

To use the media library image column:

```
use Filament\Tables\Columns\ElegantlyMediaImageColumn;

ElegantlyMediaImageColumn::make('avatar')
```

The media library image column supports all the customization options of the [original image column](https://filamentphp.com/docs/tables/columns/image).

### Passing a collection

[](#passing-a-collection-1)

Optionally, you may pass a `collectionName()`:

```
use Filament\Tables\Columns\ElegantlyMediaImageColumn;

ElegantlyMediaImageColumn::make('avatar')
    ->collectionName('avatars')
```

By default, only media without a collection (using the `default` collection) will be shown. If you want to show media from all collections, you can use the `allCollections()` method:

```
use Filament\Tables\Columns\ElegantlyMediaImageColumn;

ElegantlyMediaImageColumn::make('avatar')
    ->allCollections()
```

### Using conversions

[](#using-conversions-1)

You may also specify a `conversionName()` to load the file from showing it in the table, if present:

```
use Filament\Tables\Columns\ElegantlyMediaImageColumn;

ElegantlyMediaImageColumn::make('avatar')
    ->conversionName('thumb')
```

### Filtering media

[](#filtering-media-1)

It's possible to target the column to only display a subset of media in a collection. To do that, you can filter the media collection using the `filterMediaUsing()` method. This method accepts a function that receives the `$media` collection and manipulates it. You can use any [collection method](https://laravel.com/docs/collections#available-methods) to filter it.

For example, you could scope the column to only display media that has certain custom properties:

```
use Filament\Tables\Columns\ElegantlyMediaImageColumn;
use Illuminate\Support\Collection;

ElegantlyMediaImageColumn::make('images')
    ->filterMediaUsing(
        fn (Collection $media): Collection => $media->where(
            'metadata.gallery_id',
            12345,
        ),
    )
```

Infolist entry
--------------

[](#infolist-entry)

To use the media library image entry:

```
use Filament\Infolists\Components\ElegantlyMediaImageEntry;

ElegantlyMediaImageEntry::make('avatar')
```

The media library image entry supports all the customization options of the [original image entry](https://filamentphp.com/docs/infolists/entries/image).

### Passing a collection

[](#passing-a-collection-2)

Optionally, you may pass a `collectionName()`:

```
use Filament\Infolists\Components\ElegantlyMediaImageEntry;

ElegantlyMediaImageEntry::make('avatar')
    ->collectionName('avatars')
```

By default, only media without a collection (using the `default` collection) will be shown. If you want to show media from all collections, you can use the `allCollections()` method:

```
use Filament\Infolists\Components\ElegantlyMediaImageEntry;

ElegantlyMediaImageEntry::make('avatar')
    ->allCollections()
```

### Using conversions

[](#using-conversions-2)

You may also specify a `conversionName()` to load the file from showing it in the infolist, if present:

```
use Filament\Infolists\Components\ElegantlyMediaImageEntry;

ElegantlyMediaImageEntry::make('avatar')
    ->conversionName('thumb')
```

### Filtering media

[](#filtering-media-2)

It's possible to target the entry to only display a subset of media in a collection. To do that, you can filter the media collection using the `filterMediaUsing()` method. This method accepts a function that receives the `$media` collection and manipulates it. You can use any [collection method](https://laravel.com/docs/collections#available-methods) to filter it.

For example, you could scope the entry to only display media that has certain custom properties:

```
use Filament\Tables\Columns\ElegantlyMediaImageEntry;
use Illuminate\Support\Collection;

ElegantlyMediaImageEntry::make('images')
    ->filterMediaUsing(
        fn (Collection $media): Collection => $media->where(
            'metadata.gallery_id',
            12345,
        ),
    )
```

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance84

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 77.3% 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 ~28 days

Recently: every ~34 days

Total

27

Last Release

111d ago

Major Versions

v3.11.2 → v4.0.02025-08-15

4.x-dev → 5.x-dev2026-01-18

PHP version history (2 changes)v3.0.0PHP ^8.1

v4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d769563728757858e249f266ac2555f28db5640124df92821ed17d93ee76fc7b?d=identicon)[QuentinGab](/maintainers/QuentinGab)

---

Top Contributors

[![danharrin](https://avatars.githubusercontent.com/u/41773797?v=4)](https://github.com/danharrin "danharrin (119 commits)")[![QuentinGab](https://avatars.githubusercontent.com/u/40128136?v=4)](https://github.com/QuentinGab "QuentinGab (34 commits)")[![AKurka](https://avatars.githubusercontent.com/u/44458979?v=4)](https://github.com/AKurka "AKurka (1 commits)")

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/finller-filament-media-plugin/health.svg)

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

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M123](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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