PHPackages                             jameslkingsley/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. [Image &amp; Media](/categories/media)
4. /
5. jameslkingsley/nova-media-library

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

jameslkingsley/nova-media-library
=================================

Laravel Nova tools for managing the Spatie media library.

1.4.1(7y ago)4047.0k↓50%5[6 issues](https://github.com/jameslkingsley/nova-media-library/issues)MITVuePHP &gt;=7.1.0

Since Aug 30Pushed 7y ago3 watchersCompare

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

READMEChangelog (10)DependenciesVersions (13)Used By (0)

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

[](#laravel-nova-media-library)

Attention: Please consider using [this package](https://github.com/ebess/advanced-nova-media-library) instead, it has a lot more support for various medialibrary features, and will probably fit your needs better!
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#attention-please-consider-using-this-package-instead-it-has-a-lot-more-support-for-various-medialibrary-features-and-will-probably-fit-your-needs-better)

This package is designed to be used with the [awesome media library package from Spatie](https://github.com/spatie/laravel-medialibrary). With this package you can add an image field for uploading single files to a resource, a generic file field for other types, and add an images field to resources to display all of their associated media.

```
use Kingsley\NovaMediaLibrary\Fields\Image;

Image::make('Avatar', 'avatar')
    ->usingConversion('thumb')
    ->preservingOriginal()
```

In this example we're defining a field called `Avatar` that uses the `avatar` collection. It's also calling `usingConversion` to set the `thumb` conversion as the image to be displayed (on detail and index). The other methods called are **dynamically** applied to the upload request - **this lets you call any media-library method on the field.**.

If you want it to remove the old image before uploading the new one, be sure to make your model's media collection a [single file collection](https://docs.spatie.be/laravel-medialibrary/v7/working-with-media-collections/defining-media-collections#single-file-collections).

When you want to upload a file that isn't an image, you can use the rudimentary `File` field included with this package. It follows the same format as registering an `Image` field.

```
use Kingsley\NovaMediaLibrary\Fields\File;

File::make('Invoice', 'invoice')
```

That's all there is to it! The rest of the configuration should be done in the media collection itself, such as:

```
public function registerMediaCollections()
{
    $this
        ->addMediaCollection('invoice')
        ->singleFile()
        ->acceptsFile(function (File $file) {
            return $file->mimeType === 'application/pdf';
        });
}
```

To show all media records for your resource simply add the `Images` field like so:

```
use Kingsley\NovaMediaLibrary\Fields\Images;

public function fields(Request $request)
{
    return [
        ...
        Images::make(),
    ];
}
```

This will automatically use the `media` attribute on your model (which the `HasMediaTrait` adds).

**Note: You currently cannot create media directly from Nova.**

#### Registering the media resource

[](#registering-the-media-resource)

If you'd like to use the media resource included with this package, you need to register it manually in your `NovaServiceProvider` in the `boot` method.

```
Nova::resources([
    \Kingsley\NovaMediaLibrary\Resources\Media::class
]);
```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 72.4% 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 ~13 days

Recently: every ~33 days

Total

12

Last Release

2664d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11015784?v=4)[James Kingsley](/maintainers/jameslkingsley)[@jameslkingsley](https://github.com/jameslkingsley)

---

Top Contributors

[![jameslkingsley](https://avatars.githubusercontent.com/u/11015784?v=4)](https://github.com/jameslkingsley "jameslkingsley (21 commits)")[![ragingdave](https://avatars.githubusercontent.com/u/1168344?v=4)](https://github.com/ragingdave "ragingdave (4 commits)")[![Elhebert](https://avatars.githubusercontent.com/u/3165079?v=4)](https://github.com/Elhebert "Elhebert (2 commits)")[![ebess](https://avatars.githubusercontent.com/u/5565003?v=4)](https://github.com/ebess "ebess (1 commits)")[![rahman95](https://avatars.githubusercontent.com/u/15032635?v=4)](https://github.com/rahman95 "rahman95 (1 commits)")

---

Tags

laravellibrarymedianovaspatielaravelnova

### Embed Badge

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

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

###  Alternatives

[classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

154172.0k](/packages/classic-o-nova-media-library)[mostafaznv/nova-ckeditor

CkEditor for Laravel Nova

57327.2k1](/packages/mostafaznv-nova-ckeditor)[r64/nova-image-cropper

A Laravel Nova field.

56293.4k](/packages/r64-nova-image-cropper)[mostafaznv/nova-video

Video Field for Laravel Nova

22398.0k1](/packages/mostafaznv-nova-video)[silvanite/nova-field-cloudinary

A Laravel Nova Image Field with Flysystem Adapter for storing and retrieving media from Cloudinary

2772.0k3](/packages/silvanite-nova-field-cloudinary)[stepanenko3/nova-media-field

A Laravel Nova field for laravel-medilibrary.

1717.5k](/packages/stepanenko3-nova-media-field)

PHPackages © 2026

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