PHPackages                             apimediaru/nova-media-library - 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. apimediaru/nova-media-library

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

apimediaru/nova-media-library
=============================

A Laravel Nova field.

1.0.1(4y ago)0190[1 issues](https://github.com/apimediaru/nova-media-library/issues)MITVuePHP &gt;=7.1.0

Since Mar 26Pushed 2y ago2 watchersCompare

[ Source](https://github.com/apimediaru/nova-media-library)[ Packagist](https://packagist.org/packages/apimediaru/nova-media-library)[ RSS](/packages/apimediaru-nova-media-library/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (15)Used By (0)

Nova Media Library
==================

[](#nova-media-library)

This [Laravel Nova](https://nova.laravel.com/) package provides frontend UI and field with some useful options over forked and modified for our usage library [spatie\\laravel-medialibrary](https://spatie.be/docs/laravel-medialibrary/v9/introduction). Documentation how to use base media library could be found [here](https://spatie.be/docs/laravel-medialibrary/v9/introduction).

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

[](#installation)

```
composer require apimediaru/nova-media-library

```

Usage
-----

[](#usage)

Step 1: register model collections and conversions

```
use APIMedia\NovaMediaLibrary\Http\Services\MediaLibraryService;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\HasMedia;
use Spatie\Image\Manipulations;

class ExampleModel extends Model implements HasMedia
{
    use InteractsWithMedia;

    /**
     * Register media collections
     */
    public function registerMediaCollections(): void
    {
        $this->addMediaCollection('gallery');
    }

    /**
     * Register media conversions
     *
     * @throws \Spatie\Image\Exceptions\InvalidManipulation
     */
    public function registerMediaConversions(Media $media = null): void
    {
        // Adds 'thumbnail' conversions attached to all collections
        MediaLibraryService::addLibraryConversions($this);

        $this->addMediaConversion('thumb')
            ->fit(Manipulations::FIT_CROP, 150, 150)
            ->performOnCollections('gallery');

        $this->addMediaConversion('medium')
            ->fit(Manipulations::FIT_MAX, 720, 720)
            ->performOnCollections('gallery');

        $this->addMediaConversion('large')
            ->fit(Manipulations::FIT_MAX, 1920, 1920)
            ->performOnCollections('gallery');
    }
}

```

Step 2: add nova field. Collection key resolves as nova default field attribute, so you can omit the second argument for `make` method.

```
use Laravel\Nova\Http\Requests\NovaRequest;

class ExampleResource extends Resource {
    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function fields(Request $request)
    {
        return [
            // ...
            MediaField::make(__('gallery'), 'gallery'),
        ];
    }
}

```

### Limit media files count

[](#limit-media-files-count)

```
public function fields(Request $request)
    {
        return [
            // ...
            MediaField::make(__('gallery'), 'gallery')
                ->limit(10),
        ];
    }

```

### Disable / enable checking duplicates for certain collection

[](#disable--enable-checking-duplicates-for-certain-collection)

```
public function fields(Request $request)
    {
        return [
            // ...
            MediaField::make(__('gallery'), 'gallery')
                ->checkDuplicates(false),
        ];
    }

```

Nova component
--------------

[](#nova-component)

- Drag-and-drop single or multiple files to upload
- Press `ctrl+A` to toggle all files selection
- Click thumbnail with `ctrl`, `shift` or `ctrl+shift` modifier to select multiple media files just like in default File Explorer
- Use context menu clicking by thumbnail to perform multiple actions
- Change display order by dragging single or multiple files

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Recently: every ~92 days

Total

12

Last Release

936d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cad9839aa181ba6e8399f3750b57a0ddcac3e727f9aa930d7be85a98f0be067?d=identicon)[apimediaru](/maintainers/apimediaru)

---

Top Contributors

[![ExileofAranei](https://avatars.githubusercontent.com/u/41694699?v=4)](https://github.com/ExileofAranei "ExileofAranei (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/apimediaru-nova-media-library/health.svg)

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

###  Alternatives

[ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

6123.3M21](/packages/ebess-advanced-nova-media-library)[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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