PHPackages                             cznec/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. [Admin Panels](/categories/admin)
4. /
5. cznec/nova-media-hub

ActiveLibrary[Admin Panels](/categories/admin)

cznec/nova-media-hub
====================

A Laravel Nova tool for managing media.

00PHP

Since Feb 11Pushed 1y agoCompare

[ Source](https://github.com/cznec/nova-media-hub)[ Packagist](https://packagist.org/packages/cznec/nova-media-hub)[ RSS](/packages/cznec-nova-media-hub/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)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.0`
- `laravel/nova: ^4.0`

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

15

—

LowBetter than 3% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.1% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/50eb87772391dcd28ef3251661e7656d9963691c8997dce739f6b9f5b9f79255?d=identicon)[cznec](/maintainers/cznec)

---

Top Contributors

[![Tarpsvo](https://avatars.githubusercontent.com/u/2018660?v=4)](https://github.com/Tarpsvo "Tarpsvo (269 commits)")[![KasparRosin](https://avatars.githubusercontent.com/u/33309407?v=4)](https://github.com/KasparRosin "KasparRosin (22 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 (3 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)")[![SteJaySulli](https://avatars.githubusercontent.com/u/60765965?v=4)](https://github.com/SteJaySulli "SteJaySulli (1 commits)")[![robindrost](https://avatars.githubusercontent.com/u/588012?v=4)](https://github.com/robindrost "robindrost (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)")

### Embed Badge

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

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

PHPackages © 2026

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