PHPackages                             finnwiel/shazzoo-media - 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. finnwiel/shazzoo-media

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

finnwiel/shazzoo-media
======================

A media library for Laravel

v3.0.1(1mo ago)1126MITPHPPHP ^8.2

Since May 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/FinnWiel/shazzoo-media)[ Packagist](https://packagist.org/packages/finnwiel/shazzoo-media)[ RSS](/packages/finnwiel-shazzoo-media/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelogDependencies (16)Versions (42)Used By (0)

Shazzoo Media
=============

[](#shazzoo-media)

[![License](https://camo.githubusercontent.com/7f4b08d21f463581cd383d17e196e4fb6c7e84c531928960dcfae3da80a29dda/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f66696e6e7769656c2f7368617a7a6f6f2d6d656469612e737667)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/bafc202ba4611b9265025970d5d937b8febf499f80275bd85a43681368490eaf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66696e6e7769656c2f7368617a7a6f6f2d6d656469612e737667)](https://packagist.org/packages/finnwiel/shazzoo-media)[![Laravel](https://camo.githubusercontent.com/054001208e630d670c9ff86fb0fb81b7f716522604f3992b2e54bcc228a53f00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312d2d31332e782d726564)](https://camo.githubusercontent.com/054001208e630d670c9ff86fb0fb81b7f716522604f3992b2e54bcc228a53f00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d31312d2d31332e782d726564)[![Filament](https://camo.githubusercontent.com/4f155d8fa32c7fadc572a51d1cd16b1a09602d6a89af6897a4b6c1954dc057d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f66696c616d656e742d352e782d79656c6c6f77)](https://camo.githubusercontent.com/4f155d8fa32c7fadc572a51d1cd16b1a09602d6a89af6897a4b6c1954dc057d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f66696c616d656e742d352e782d79656c6c6f77)[![PHP](https://camo.githubusercontent.com/c9f64f714c636ba27a3bba6dfd52f98426832db1262747efa54b212d16943651/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c7565)](https://camo.githubusercontent.com/c9f64f714c636ba27a3bba6dfd52f98426832db1262747efa54b212d16943651/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c7565)

A Laravel + Filament plugin that extends [Filament Curator](https://github.com/awcodes/filament-curator) with custom media conversion logic and a customized media model.

---

- [Installation](#-installation)
- [Usage](#-usage)
    - [Global Settings](#global-settings)
    - [Filament Panels](#filament-panels)
    - [Picker Field](#picker-field)
    - [Conversions](#conversions)

---

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

[](#installation)

⚠️ **Important:** Before installing, make sure the GD extension is enabled in your php.ini. Without it, image conversions will fail and no thumbnails will be generated.

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

```
composer require finnwiel/shazzoo-media
```

If you installed Curator before Shazzoo Media, you’ll need to remove Curator’s media table migration manually before running the install command.

```
php artisan shazzoo_media:install
```

> **Note:** This plugin will install Curator for you, but you still need to set up your Filament panel theme.

Import Curator's stylesheet in your Filament panel theme CSS file.

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

Add Curator and Shazzoo Media views to your theme sources.

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

Usage
-----

[](#usage)

### Global settings

[](#global-settings)

The plugins settings can be managed through the config file

```
php artisan vendor:publish --tag=shazzoo_media-config
```

> **Note:** This plugin will also change some of curators settings, you can still manage curators setting but they may not work with Shazzoo Media

To publish the plugins Model run:

```
php artisan vendor:publish --tag=shazzoo-media-model
```

**Important:** When publishing the model make sure to also change the model in the config.

---

### Filament Panels

[](#filament-panels)

If you are using Filament Panels you will need to add the Plugin to your 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.

```
public function panel(Panel $panel): Panel
{
    return $panel
        ->viteTheme('resources/css/filament/admin/theme.css')
        ->plugins([
                \Awcodes\Curator\CuratorPlugin::make()
                    ->label('Media')
                    ->registerNavigation(true)
                    ->showBadge(true)
            ])
}
```

---

### Picker field

[](#picker-field)

Shazzoo Media adds a conversions method to the picker field, this method accepts an array. The conversions will subsequently be set in the database for each array item. Shazzoo Media will also create the conversion image.

The picker also has a fileType method, this accepts the following strings: 'image', 'icon', 'document'.

CommandsTags`image``jpeg` `png`, `webp`, `gif``icon``svg``document``pdf` `docx````
ShazzooMediaPicker::make('featured_image_id')
                    ->conversions(['thumbnail'])
                    ->fileType(), // 'image', 'icon', 'document'
```

To generate actually set the conversions in the database you need to add a trait to the create and edit classes of your resource.

```
use FinnWiel\ShazzooMedia\Traits\HandlesConversions;

class CreatePost extends CreateRecord
{
    use HandlesConversions;

    protected static string $resource = PostResource::class;
}
```

---

### Conversions

[](#conversions)

Conversions are set in `config/shazzoo_media.php` in the conversions array. To add or remove conversions change the array with the same structure.

```
'conversions' => [
    'profile' => ['width' => 80, 'height' => 80],
    'thumbnail' => ['width' => 200, 'height' => 200],
    'medium' => ['width' => 400, 'height' => 400],
    'large' => ['width' => 600, 'height' => 600],
],
```

So adding a new conversion called small would look like this:

```
'conversions' => [
    'profile' => ['width' => 80, 'height' => 80, 'fit' => 'crop'],
    'thumbnail' => ['width' => 200, 'height' => 200],
    'medium' => ['width' => 400, 'height' => 400],
    'large' => ['width' => 600, 'height' => 600],
    'small' => ['width' => 100, 'height' => 100],
],
```

As you can see the existing conversions can also be edited, this can even be done when some conversions have already been made. Just be sure to run the `php artisan media:conversions:regenerate` command. This will regenerate the conversions to the new sizes.

---

### Showing images

[](#showing-images)

To show images in your frontend using the `ShazzooMedia` model, you can leverage the built-in dynamic URL accessors for media conversions.

For each image conversion defined in your config (shazzoo\_media.conversions), a dynamic property is available on your media model:

```
$image->thumbnail_url  // returns URL for the 'thumbnail' conversion
$image->web_url        // returns URL for the 'web' conversion
```

If the conversion file exists, it returns the converted image URL. If not, it gracefully falls back to the original image URL.

Example in blade:

```

```

#### Defining relationships

[](#defining-relationships)

You are responsible for defining the relationship between your Eloquent models and the media records.

##### One-to-One Example:

[](#one-to-one-example)

For a model that has a single media item, like a `Post` with a featured image:

```
// In your Post.php model
use FinnWiel\ShazzooMedia\Models\ShazzooMedia;

public function featuredImage()
{
    return $this->belongsTo(ShazzooMedia::class, 'media_id');
}
```

Usage:

```

```

##### One-to-Many Example:

[](#one-to-many-example)

For a model that has multiple images, like a `Product` with a gallery:

```
// In your Product.php model
use FinnWiel\ShazzooMedia\Models\ShazzooMedia;

public function gallery()
{
    return $this->hasMany(ShazzooMedia::class, 'product_id');
}
```

Usage:

```
@foreach($product->gallery as $image)

@endforeach
```

---

### Artisan commands

[](#artisan-commands)

The Shazzoo Media plugin uses some artisan commands.

CommandsTagsUses`media:clear`-Clears your image files from the storage folder.`media:clear-conversions`-Clears your image conversion files from the storage folder.`media:conversions:clear-db``id`Clears conversion(s) in the database.`media:conversions:set-db``id` `append`Sets conversion(s) in the databse.`media:conversions:generate``id` `all` `only`Generates the conversions for the images.`media:conversions:regenerate``id` `only`Regenerates the conversions for the images.`media:conversions:list`-Lists out all image conversions---

### Policies &amp; Tenancy

[](#policies--tenancy)

#### Policies

[](#policies)

The Shazzoo Media library doesn't use a policy by default but lets you publish a policy template.

```
php artisan vendor:publish --tag=shazzoo-media-policy
```

This will publish a policy file to `App/Policies/MediaPolicy.php` the policy should be registered automatically by the plugin. The published file will be a blank policy, you will need to add your own rules. Also make sure that `media_policies` is set to true in the `config/shazzoo_media.php`.

#### Tenancy

[](#tenancy)

This package does not implement tenancy or user-based access control out of the box.

If your application requires scoping media by tenant, team, or user, you are responsible for applying your own global scope to the `ShazzooMedia` model. This can be done by publishing the model and implementing it there, or you can add the global scope in the `AppServiceProvider.php`'s boot function.

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance92

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~8 days

Recently: every ~0 days

Total

41

Last Release

41d ago

Major Versions

v0.1.4 → v1.0.02025-05-07

v1.4.2 → v2.0.02026-03-20

v2.0.0 → v3.0.02026-03-24

v1.4.3 → 2.x-dev2026-04-02

v2.0.1 → v3.0.12026-04-02

PHP version history (2 changes)v0.1.1PHP ^8.1

v2.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/91fe70d3d41b1fbd8b3e8973502b8d8a866d2593847e977ab0ac158e3c09dc31?d=identicon)[FinnWiel](/maintainers/FinnWiel)

---

Top Contributors

[![FinnWiel](https://avatars.githubusercontent.com/u/117499223?v=4)](https://github.com/FinnWiel "FinnWiel (79 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/finnwiel-shazzoo-media/health.svg)

```
[![Health](https://phpackages.com/badges/finnwiel-shazzoo-media/health.svg)](https://phpackages.com/packages/finnwiel-shazzoo-media)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[awcodes/filament-curator

A media picker plugin for FilamentPHP.

434297.7k19](/packages/awcodes-filament-curator)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)

PHPackages © 2026

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