PHPackages                             awcodes/filament-curator - 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. awcodes/filament-curator

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

awcodes/filament-curator
========================

A media picker plugin for FilamentPHP.

v5.0.6(1mo ago)434297.7k—1.4%108[1 PRs](https://github.com/awcodes/filament-curator/pulls)16MITPHPPHP ^8.2CI passing

Since Apr 13Pushed 2mo ago11 watchersCompare

[ Source](https://github.com/awcodes/filament-curator)[ Packagist](https://packagist.org/packages/awcodes/filament-curator)[ Docs](https://github.com/awcodes/filament-curator)[ GitHub Sponsors](https://github.com/awcodes)[ RSS](/packages/awcodes-filament-curator/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (248)Used By (16)

Filament Curator
================

[](#filament-curator)

A media picker/manager plugin for Filament Admin.

[![Latest Version](https://camo.githubusercontent.com/43476086851b5b42a6eceb370427b7f292248daf3f371280d4cd4a03b8016bdd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6177636f6465732f66696c616d656e742d63757261746f722e7376673f7374796c653d666c61742d73717561726526636f6c6f723d626c7565266c6162656c3d52656c65617365)](https://github.com/awcodes/filament-curator/releases)[![MIT Licensed](https://camo.githubusercontent.com/a7e65aee57b11d28e4caff8b945729a66be0bb663f7f93bd24c5aa65699f148e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/2e3bb5ad8a0956bb9f95b0a240471e34a3245a3b718ea13a007117fba4a68e6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6177636f6465732f66696c616d656e742d63757261746f722e7376673f7374796c653d666c61742d73717561726526636f6c6f723d626c7565266c6162656c3d446f776e6c6f616473)](https://packagist.org/packages/awcodes/filament-curator)[![GitHub Repo stars](https://camo.githubusercontent.com/4fa49e096b87d3b525a3355e0acac4a4e95bf7ccbbd2b778ea6b86ee0682d624/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6177636f6465732f66696c616d656e742d63757261746f723f7374796c653d666c61742d73717561726526636f6c6f723d626c7565266c6162656c3d5374617273)](https://github.com/awcodes/filament-curator/stargazers)

Warning

This package does not work with Spatie Media Library.

Compatibility
-------------

[](#compatibility)

Package VersionFilament Version1.x2.x2.x2.x3.x3.x4.x4.xUpgrading from v3 to v4
-----------------------

[](#upgrading-from-v3-to-v4)

Please see the [UPGRADE guide](UPGRADE.md) for instructions on upgrading from v3 to v4.

```
php artisan curator:upgrade
```

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

[](#installation)

You can install the package via composer then run the installation command:

```
composer require awcodes/filament-curator
```

```
php artisan curator:install
```

Note

If you are using the stand-alone forms package then you will need to include the Curator modal in your layout file, typically you would place this, before the closing `body` tag.

```

```

Important

If you have not set up a custom theme and are using Filament Panels follow the instructions in the [Filament Docs](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme) first.

After setting up a custom theme add the plugin's views and styles to your theme css file or your app's css file if using the standalone packages.

```
@import '../../../../vendor/awcodes/filament-curator/resources/css/plugin.css';

@source '../../../../vendor/awcodes/filament-curator/resources/**/*.blade.php';
```

Usage
-----

[](#usage)

### Global Settings

[](#global-settings)

Global settings can be managed through the plugin's config file. You can publish the config file using the following:

```
php artisan vendor:publish --tag="curator-config"
```

### With Filament Panels

[](#with-filament-panels)

If you are using Filament Panels you will need to add the Plugin to you Panel's configuration. This will register the plugin's resources with the Panel. All methods are optional, and will be read from the config file if not provided.

```
use Awcodes\Curator\CuratorPlugin;
use Filament\Support\Icons\Heroicon

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            CuratorPlugin::make()
                ->label('Media')
                ->pluralLabel('Media')
                ->navigationIcon(Heroicon::OutlinedPhoto)
                ->navigationGroup('Content')
                ->navigationSort(3)
                ->showBadge(true)
                ->registerNavigation(true)
                ->curations(true)
                ->fileSwap(true),
        ]);
}
```

### Curator Picker Field

[](#curator-picker-field)

Include the CuratorPicker field in your forms to trigger the modal and either select an existing image or upload a new one. Some common methods from Filament's `FileUpload` component can be used to help with sizing, validation, etc. for specific instances of each CuratorPicker.

```
use Awcodes\Curator\Components\Forms\CuratorPicker;
use Filament\Support\Enums\Size;

CuratorPicker::make(string $fieldName)
    ->label(string $customLabel)
    ->buttonLabel(string | Htmlable | Closure $buttonLabel)
    ->color('primary|secondary|success|danger') // defaults to gray
    ->outlined(true|false) // defaults to true
    ->size(Size::Medium)
    ->constrained(true|false) // defaults to false (forces image to fit inside the preview area)
    ->pathGenerator(DatePathGenerator::class|UserPathGenerator::class) // see path generators below
    ->lazyLoad(bool | Closure $condition) // defaults to true
    ->listDisplay(bool | Closure $condition) // defaults to true
    ->tenantAware(bool | Closure $condition) // defaults to true
    ->defaultPanelSort(string | Closure $direction) // defaults to 'desc'
    // see https://filamentphp.com/docs/4.x/forms/file-upload for more information about the following methods
    ->preserveFilenames()
    ->maxWidth()
    ->minSize()
    ->maxSize()
    ->rules()
    ->acceptedFileTypes()
    ->disk()
    ->visibility()
    ->directory()
    ->imageCropAspectRatio()
    ->imageResizeTargetWidth()
    ->imageResizeTargetHeight()
    ->multiple() // required if using a relationship with multiple media
    ->relationship(string $relationshipName, string 'titleColumnName')
    ->orderColumn('order') // only necessary to rename the order column if using a relationship with multiple media
```

### Relationships

[](#relationships)

#### Single

[](#single)

Form component

```
CuratorPicker::make('featured_image_id')
    ->relationship('featured_image', 'id'),
```

Model

```
use Awcodes\Curator\Models\Media;

public function featuredImage(): BelongsTo
{
    return $this->belongsTo(Media::class, 'featured_image_id', 'id');
}
```

#### Multiple

[](#multiple)

Form component

```
CuratorPicker::make('product_picture_ids')
    ->multiple()
    ->relationship('product_pictures', 'id')
    ->orderColumn('order'), // only necessary if you need to rename the order column
```

Model

```
use Awcodes\Curator\Models\Media;

public function productPictures(): BelongsToMany
{
    return $this
        ->belongsToMany(Media::class, 'media_post', 'post_id', 'media_id')
        ->withPivot('order')
        ->orderBy('order');
}
```

### RichEditor Integration

[](#richeditor-integration)

Curator comes with built-in integration for Filament's RichEditor field.

```
use Awcodes\Curator\Components\Forms\RichEditor\AttachCuratorMediaPlugin;

\Filament\Forms\Components\RichEditor::make('content')
    ->tools([
        'attachCuratorMedia'
    ])
    ->plugins([
        AttachCuratorMediaPlugin::make(),
    ]),
```

### Path Generation

[](#path-generation)

By default, Curator will use the directory and disk set in the config to store your media. If you'd like to store the media in a different way Curator comes with Path Generators that can be used to modify the behavior. Just set the one you want to use globally in the config or per instance on your `CuratorPicker` field.

```
use Awcodes\Curator\View\Components\CuratorPicker;
use Awcodes\Curator\PathGenerators\DatePathGenerator;

public function register()
{
    CuratorPicker::make('image')
        ->pathGenerator(DatePathGenerator::class);
}
```

#### Available Generators

[](#available-generators)

- `DefaultPathGenerator` will save files in disk/directory.
- `DatePathGenerator` will save files in disk/directory/Y/m/d.
- `UserPathGenerator` will save files in disk/directory/user-auth-identifier

You are also free to use your own Path Generators by implementing the `PathGenerator` interface on your own classes.

```
use Awcodes\Curator\PathGenerators;

class CustomPathGenerator implements PathGenerator
{
    public function getPath(?string $baseDir = null): string
    {
        return ($baseDir ? $baseDir . '/' : '') . 'my/custom/path';
    }
}
```

### Curator Column

[](#curator-column)

To render your media in a table Curator comes with a `CuratorColumn` which has the same methods as Filament's ImageColumn.

```
CuratorColumn::make('featured_image')
    ->size(40)
```

For multiple images you can control the number of images shown, the ring size and the overlap.

```
CuratorColumn::make('product_pictures')
    ->ring(2) // options 0,1,2,4
    ->overlap(4) // options 0,2,3,4
    ->limit(3),
```

#### Relationships

[](#relationships-1)

If you are using a relationship to store your media then you will encounter n+1 issues on the column. In order to prevent this you should modify your table query to eager load the relationship.

For example when using the admin panel in your ListResource

```
protected function getTableQuery(): Builder
{
    return parent::getTableQuery()->with(['featured_image', 'product_pictures']);
}
```

Or, if you are using a Table class

```
public static function configure(Table $table): Table
{
    return $table
        ->modifyQueryUsing(fn (Builder $query) => $query->with('media', 'gallery'));
}
```

### Curations

[](#curations)

Curations are a way to create custom sizes and focal points for your images.

#### Curation Presets

[](#curation-presets)

If you have a curation that you are constantly using you can create Presets which will be available in the Curation modal for easier reuse. After creating curation presets, they can be referenced by their key to output them in your blade files.

```
use Awcodes\Curator\Curations\CurationPreset;
use Awcodes\Curator\Facades\Curation;

public function register(): void
{
    Curation::presets([
        CurationPreset::make('Thumbnail')
            ->height(200)
            ->format('webp')
            ->quality(80)
            ->width(200)
    ]);
}
```

### Glider Blade Component

[](#glider-blade-component)

To make it as easy as possible to output your media, Curator comes with an `` blade component.

See [Glide's quick reference](https://glide.thephpleague.com/2.0/api/quick-reference/) for more information about Glide's options.

**Special attributes**

- media: id (int) or model (Media) instance ***required***
- loading: defaults to 'lazy'
- glide: this can be used to pass in a glide query string if you do not want to use individual attributes
- srcset: this will output the necessary srcset with glide generated urls. Must be an array of srcset widths and requires the 'sizes' attribute to also be set.
- force: (bool) this can be used to force glider to return a signed url and is helpful when returning urls from cloud disks. This should be used with the knowledge that it could have performance implications.

```

```

#### Glider Fallback Images

[](#glider-fallback-images)

Glider allows for a fallback image to be used if the media item does not exist. This can be set by passing in the `fallback` attribute referencing one of your registered `GliderFallback`s.

```
use Awcodes\Curator\Glide\GliderFallback;
use Awcodes\Curator\Facades\Glide;

public function register(): void
{
    Glide::registerGliderFallbacks([
        GliderFallback::make('thumbnail')
            ->alt(string)
            ->height(int)
            ->source(string)
            ->type(string)
            ->width(int),
    ]);
}
```

Then you can reference your fallback in the blade component.

```

```

### Custom Glide Route

[](#custom-glide-route)

By default, Curator will use the route `curator` when serving images through Glide. If you want to change this you can update the `basePath` in a service provider.

```
use Awcodes\Curator\Facades\Glide;

public function register(): void
{
    Glide::basePath('media');
}
```

### Custom Glide Server

[](#custom-glide-server)

If you want to use your own Glide Server for handling served media with Glide you can pass the server config to the Glide facade in a service provider.

```
use Awcodes\Curator\Facades\Glide;

public function register(): void
{
    Glide::serverConfig([
        'driver' => 'imagick',
        'response' => new LaravelResponseFactory(app('request')),
        'source' => storage_path('app'),
        'source_path_prefix' => 'public',
        'cache' => storage_path('app'),
        'cache_path_prefix' => '.cache',
        'max_image_size' => 2000 * 2000,
    ]);
}
```

### Curation Blade Component

[](#curation-blade-component)

To make it as easy as possible to output your curations, Curator comes with an `` blade component.

**Special attributes**

- media: id (int) or model (Media) instance ***required***

```

```

### Practical use case

[](#practical-use-case)

Since curations may or may not exist for each media item it's good to use a fallback to the glider component in your blade file so images always get rendered appropriately. This also keeps you from having to create curations for every media item, only the ones where you're trying to change the focal point, etc.

```
@php
    $preset = new ThumbnailPreset();
@endphp

@if ($media->hasCuration('thumbnail'))

@else

@endif
```

### Custom Model

[](#custom-model)

If you want to use your own model for your media you can extend Curator's `Media` model with your own and set it in the config.

```
use Awcodes\Curator\Models\Media;

class CustomMedia extends Media
{
    protected $table = 'media';
}
```

```
'model' => \App\Models\Cms\Media::class,
```

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Adam Weston](https://github.com/awcodes)
- [The PHP League](https://glide.thephpleague.com/) for the awesome Glide package.
- [Cropperjs](https://github.com/fengyuanchen/cropperjs) for their amazing Javascript package.
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

69

—

FairBetter than 100% of packages

Maintenance87

Actively maintained with recent releases

Popularity58

Moderate usage in the ecosystem

Community41

Growing community involvement

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 79.4% 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 ~6 days

Total

240

Last Release

53d ago

Major Versions

v4.0.1 → v5.0.12026-01-24

v4.0.3 → v5.0.22026-01-28

v4.0.4 → v5.0.32026-03-05

v4.0.5 → v5.0.52026-03-13

v4.0.6 → 5.x-dev2026-03-26

PHP version history (4 changes)v0.0.1-alphaPHP ^8.0.2

v2.0.0PHP ^8.0

v3.0.0-alpha1PHP ^8.1

v4.0.0-alpha.1PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3596800?v=4)[Adam Weston](/maintainers/awcodes)[@awcodes](https://github.com/awcodes)

---

Top Contributors

[![awcodes](https://avatars.githubusercontent.com/u/3596800?v=4)](https://github.com/awcodes "awcodes (513 commits)")[![howdu](https://avatars.githubusercontent.com/u/533658?v=4)](https://github.com/howdu "howdu (37 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (16 commits)")[![martinmildner](https://avatars.githubusercontent.com/u/789541?v=4)](https://github.com/martinmildner "martinmildner (11 commits)")[![martin-ro](https://avatars.githubusercontent.com/u/10107779?v=4)](https://github.com/martin-ro "martin-ro (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![kirkbushell](https://avatars.githubusercontent.com/u/65171?v=4)](https://github.com/kirkbushell "kirkbushell (6 commits)")[![mszabeh](https://avatars.githubusercontent.com/u/53317316?v=4)](https://github.com/mszabeh "mszabeh (4 commits)")[![kuragehimekurara1](https://avatars.githubusercontent.com/u/98482562?v=4)](https://github.com/kuragehimekurara1 "kuragehimekurara1 (4 commits)")[![archilex](https://avatars.githubusercontent.com/u/6097099?v=4)](https://github.com/archilex "archilex (3 commits)")[![tlegenbayangali](https://avatars.githubusercontent.com/u/39906549?v=4)](https://github.com/tlegenbayangali "tlegenbayangali (3 commits)")[![dariox64](https://avatars.githubusercontent.com/u/86892155?v=4)](https://github.com/dariox64 "dariox64 (3 commits)")[![margarizaldi](https://avatars.githubusercontent.com/u/26832856?v=4)](https://github.com/margarizaldi "margarizaldi (3 commits)")[![mohamedsabil83](https://avatars.githubusercontent.com/u/10126040?v=4)](https://github.com/mohamedsabil83 "mohamedsabil83 (2 commits)")[![iotron](https://avatars.githubusercontent.com/u/50877415?v=4)](https://github.com/iotron "iotron (2 commits)")[![danharrin](https://avatars.githubusercontent.com/u/41773797?v=4)](https://github.com/danharrin "danharrin (2 commits)")[![shayan-yousefi](https://avatars.githubusercontent.com/u/19957980?v=4)](https://github.com/shayan-yousefi "shayan-yousefi (2 commits)")[![viraljetani](https://avatars.githubusercontent.com/u/1935495?v=4)](https://github.com/viraljetani "viraljetani (2 commits)")[![JarkaP](https://avatars.githubusercontent.com/u/3973865?v=4)](https://github.com/JarkaP "JarkaP (2 commits)")[![Log1x](https://avatars.githubusercontent.com/u/5745907?v=4)](https://github.com/Log1x "Log1x (2 commits)")

---

Tags

filamentfilament-pluginpluginlaravelfilamentawcodescurator

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/awcodes-filament-curator/health.svg)

```
[![Health](https://phpackages.com/badges/awcodes-filament-curator/health.svg)](https://phpackages.com/packages/awcodes-filament-curator)
```

###  Alternatives

[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[awcodes/filament-quick-create

Plugin for Filament Admin that adds a dropdown menu to the header to quickly create new items.

246177.6k7](/packages/awcodes-filament-quick-create)[awcodes/filament-badgeable-column

Filament Tables column to append and prepend badges.

142419.3k3](/packages/awcodes-filament-badgeable-column)[awcodes/filament-table-repeater

A modified version of the Filament Forms Repeater to display it as a table.

262815.1k5](/packages/awcodes-filament-table-repeater)[awcodes/overlook

A Filament plugin that adds an app overview widget to your admin panel.

187174.1k4](/packages/awcodes-overlook)[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)
