PHPackages                             outl1ne/nova-media-hub - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. outl1ne/nova-media-hub

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

outl1ne/nova-media-hub
======================

A Laravel Nova tool for managing media.

3.0.1(9mo ago)4656.0k↓48.7%26[13 issues](https://github.com/outl1ne/nova-media-hub/issues)[2 PRs](https://github.com/outl1ne/nova-media-hub/pulls)MITPHPPHP &gt;=8.2

Since Jul 4Pushed 3d ago3 watchersCompare

[ Source](https://github.com/outl1ne/nova-media-hub)[ Packagist](https://packagist.org/packages/outl1ne/nova-media-hub)[ GitHub Sponsors](https://github.com/outl1ne)[ RSS](/packages/outl1ne-nova-media-hub/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (60)Used By (0)

Nova Media Hub
==============

[](#nova-media-hub)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3a0857be78726270f6026adbf3d45ca0c38b730cca419ab2ba70695fbbbb6123/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f75746c316e652f6e6f76612d6d656469612d6875622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outl1ne/nova-media-hub)[![Total Downloads](https://camo.githubusercontent.com/47789cbbf32bf1fb8ccf37679904010c53dd3498135711484323a6e772a4da39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f75746c316e652f6e6f76612d6d656469612d6875622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outl1ne/nova-media-hub)

This [Laravel Nova](https://nova.laravel.com) package allows you to manage media and media fields.

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

[](#requirements)

- `php: >=8.2`
- `laravel/nova: ^5.0`

Other Versions
--------------

[](#other-versions)

[`laravel/nova: ^4.0`](https://github.com/outl1ne/nova-media-hub/tree/nova-v4)

Features
--------

[](#features)

- Media Hub UI in separate view
- Media Hub field for selecting single/multiple media
- Image optimization and multiple conversions support
- File naming and path making customization
- Dark mode support
- A lot configuration options
    - See [the configuration file](config/nova-media-hub.php).

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

[](#screenshots)

[![Media Hub](docs/media-hub-dark.jpeg)](docs/media-hub-dark.jpeg)

[![Choose media](docs/choose-media-dark.jpeg)](docs/choose-media-dark.jpeg)

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

[](#installation)

Install the package in a Laravel Nova project via Composer and run migrations:

```
# Install nova-media-hub
composer require outl1ne/nova-media-hub

# Run migrations
php artisan migrate
```

Register the tool with Nova in the `tools()` method of the `NovaServiceProvider`:

```
// in app/Providers/NovaServiceProvider.php

public function tools()
{
    return [
        // ...
        \Outl1ne\NovaMediaHub\MediaHub::make()
        // You can choose to hide the Tool from the sidebar
          ->hideFromMenu()

          // Optionally add additional fields to Media items
          ->withCustomFields(
            ['copyright' => __('Copyright')],
            overwrite: false
          )
    ];
}
```

Usage
-----

[](#usage)

### Fields

[](#fields)

This package provides a field `MediaHubField` which allows you to select media. This saves the media as a JSON array into the database.

Example usage:

```
use Outl1ne\NovaMediaHub\Nova\Fields\MediaHubField;

// ...

MediaHubField::make('Media', 'media')
  ->defaultCollection('products') // Define the default collection the "Choose media" modal shows
  ->multiple(), // Define whether multiple media can be selected
```

### Casting

[](#casting)

The media column of models can be automatically cast as a Collection of Media models:

```
class Product extends Model
{
    protected $casts = [
        'media' => \Outl1ne\NovaMediaHub\Casts\MediaCast::class,
    ];
}
```

```
    $cover = Product::first()->media->first();

    // ...

    $urls = Product::first()->media->pluck('url');

    // ...

    $collection = Product::first()->media->where('collection_name', 'Details');
```

### Configure

[](#configure)

The config file can be published using the following command:

```
php artisan vendor:publish --provider="Outl1ne\NovaMediaHub\MediaHubServiceProvider" --tag="config"
```

### Custom optimizer chain

[](#custom-optimizer-chain)

You can define a custom optimizer chain or add items to it like so:

```
// in app/Providers/AppServiceProvided.php

public function register() {
  // ...

  // https://github.com/spatie/image-optimizer#creating-your-own-optimization-chains
  \Outl1ne\NovaMediaHub\MediaHub::withOptimizerChain(
    (new OptimizerChain)
      ->addOptimizer(new Jpegoptim([
        '--strip-all',
        '--all-progressive',
      ]))
      ->addOptimizer(new Pngquant([
        '--force',
      ]))
  );
}
```

Localization
------------

[](#localization)

The translation file(s) can be published by using the following command:

```
php artisan vendor:publish --provider="Outl1ne\NovaMediaHub\MediaHubServiceProvider" --tag="translations"
```

Credits
-------

[](#credits)

- [Tarvo Reinpalu](https://github.com/Tarpsvo)

License
-------

[](#license)

Nova Media Hub is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance76

Regular maintenance activity

Popularity44

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 82.5% 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 ~21 days

Recently: every ~119 days

Total

58

Last Release

270d ago

Major Versions

1.8.1 → 2.0.02024-04-04

2.1.0 → 3.0.02025-10-01

PHP version history (2 changes)1.0.0PHP &gt;=8.0

3.0.0PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (273 commits)")[![KasparRosin](https://avatars.githubusercontent.com/u/33309407?v=4)](https://github.com/KasparRosin "KasparRosin (31 commits)")[![valeriu-dev](https://avatars.githubusercontent.com/u/14403446?v=4)](https://github.com/valeriu-dev "valeriu-dev (5 commits)")[![murdercode](https://avatars.githubusercontent.com/u/7630252?v=4)](https://github.com/murdercode "murdercode (5 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (4 commits)")[![richard-raadi](https://avatars.githubusercontent.com/u/69033947?v=4)](https://github.com/richard-raadi "richard-raadi (2 commits)")[![FaridAghili](https://avatars.githubusercontent.com/u/8607021?v=4)](https://github.com/FaridAghili "FaridAghili (2 commits)")[![nullthoughts](https://avatars.githubusercontent.com/u/11416468?v=4)](https://github.com/nullthoughts "nullthoughts (2 commits)")[![schniper](https://avatars.githubusercontent.com/u/533628?v=4)](https://github.com/schniper "schniper (2 commits)")[![Claudio-Emmolo](https://avatars.githubusercontent.com/u/113107618?v=4)](https://github.com/Claudio-Emmolo "Claudio-Emmolo (1 commits)")[![SteJaySulli](https://avatars.githubusercontent.com/u/60765965?v=4)](https://github.com/SteJaySulli "SteJaySulli (1 commits)")[![allantatter](https://avatars.githubusercontent.com/u/386999?v=4)](https://github.com/allantatter "allantatter (1 commits)")[![RibesAlexandre](https://avatars.githubusercontent.com/u/818564?v=4)](https://github.com/RibesAlexandre "RibesAlexandre (1 commits)")[![robindrost](https://avatars.githubusercontent.com/u/588012?v=4)](https://github.com/robindrost "robindrost (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/outl1ne-nova-media-hub/health.svg)

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

###  Alternatives

[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2852.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2862.1M9](/packages/outl1ne-nova-sortable)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

92219.3k3](/packages/advoor-nova-editor-js)

PHPackages © 2026

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