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

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

moox/media
==========

This is my package media

5.0.12(4mo ago)7330↓85.7%1MITPHP

Since May 20Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/mooxphp/media)[ Packagist](https://packagist.org/packages/moox/media)[ Docs](https://moox.org/)[ GitHub Sponsors](https://github.com/mooxphp)[ RSS](/packages/moox-media/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (9)Dependencies (6)Versions (11)Used By (1)

Moox Media Package
==================

[](#moox-media-package)

A comprehensive media management package for FilamentPHP with translation support.

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

[](#installation)

Install the package using the Moox installer:

```
php artisan moox:install
```

This will:

- Publish migrations and configuration files
- Publish Spatie Media Library configuration
- Integrate the custom Media model and PathGenerator

Features
--------

[](#features)

- **Media Management**: Upload, organize, and manage media files with Spatie Media Library integration
- **Translations**: Full translation support for media metadata
- **MediaPicker Component**: Filament form component for selecting and attaching media to models
- **Media Collections**: Organize media into collections with translation support

Usage
-----

[](#usage)

### Setup Model for Media

[](#setup-model-for-media)

To use media in your model, you need to:

1. Use the `HasMediaUsable` trait
2. Implement `HasMedia` interface
3. Use `InteractsWithMedia` trait from Spatie Media Library
4. Add a JSON field for storing media metadata (e.g., `image`)
5. Optionally add a relation method to access media through usables

Example:

```
use Illuminate\Database\Eloquent\Model;
use Moox\Media\Traits\HasMediaUsable;
use Spatie\Image\Enums\Fit;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media;

class Draft extends Model implements HasMedia
{
    use HasMediaUsable, InteractsWithMedia;

    protected $fillable = [
        'image', // JSON field for media metadata
        // ... other fields
    ];

    protected $casts = [
        'image' => 'json',
        // ... other casts
    ];

    // Optional: Access media through usables relation
    public function mediaThroughUsables()
    {
        return $this->belongsToMany(
            Media::class,
            'media_usables',
            'media_usable_id',
            'media_id'
        )->where('media_usables.media_usable_type', '=', static::class);
    }

    // Optional: Register media conversions
    public function registerMediaConversions(?Media $media = null): void
    {
        $this->addMediaConversion('preview')
            ->fit(Fit::Contain, 300, 300);
    }
}
```

### Use MediaPicker in Filament Forms

[](#use-mediapicker-in-filament-forms)

```
use Moox\Media\Forms\Components\MediaPicker;

MediaPicker::make('image')
    ->multiple(false)
    ->acceptedFileTypes(['image/jpeg', 'image/png'])
```

### Access Media Metadata

[](#access-media-metadata)

When media is attached via MediaPicker, the JSON field contains:

```
{
    "file_name": "example.jpg",
    "title": "Example Image",
    "alt": "Example Image",
    "description": "Image description",
    "internal_note": "Internal notes"
}
```

### Editing Media Metadata

[](#editing-media-metadata)

When editing media in the admin panel, fields like `title`, `alt`, `description`, and `internal_note` are automatically saved as soon as you leave the field (blur event). No save button is required - changes are persisted immediately and synchronized to all models using that media.

Requirements
------------

[](#requirements)

- Laravel 12+
- Filament 4+
- Spatie Media Library
- Astrotomic Translatable

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance75

Regular maintenance activity

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.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 ~30 days

Recently: every ~64 days

Total

10

Last Release

134d ago

Major Versions

0.3.7 → 4.0.0-beta.22025-07-10

4.0.0-beta.3 → 5.0.122026-02-20

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40421928?v=4)[Alf Drollinger](/maintainers/adrolli)[@adrolli](https://github.com/adrolli)

---

Top Contributors

[![mooxbot](https://avatars.githubusercontent.com/u/106848579?v=4)](https://github.com/mooxbot "mooxbot (133 commits)")[![AzGasim](https://avatars.githubusercontent.com/u/104441723?v=4)](https://github.com/AzGasim "AzGasim (1 commits)")

---

Tags

filamentlaravellibrarymediamooxspatielaravellaravel-packagefilamentfilament-plugin

### Embed Badge

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

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

###  Alternatives

[tomatophp/filament-media-manager

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

14852.3k3](/packages/tomatophp-filament-media-manager)

PHPackages © 2026

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