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

AbandonedLibrary

bozboz/media-library
====================

v0.4.4(10y ago)03PHPPHP &gt;=5.4.0

Since Aug 21Pushed 4y ago3 watchersCompare

[ Source](https://github.com/bozboz/media-library)[ Packagist](https://packagist.org/packages/bozboz/media-library)[ RSS](/packages/bozboz-media-library/feed)WikiDiscussions aliased-media Synced yesterday

READMEChangelogDependencies (2)Versions (14)Used By (0)

Media Library
=============

[](#media-library)

Overview
--------

[](#overview)

This package provides the ability to relate a piece of Media to any model via a polymorphic join table. Once correctly configured, create/edit views for the affected models will render the MediaBrowser field. The MediaBrowser field simply presents the user with existing Media to mark as being related.

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

[](#installation)

1. Add bozboz/media-library to `composer.json`:

```
	"require": {
		"bozboz/media-library": "0.2.*"
	}

```

2. Add the following to the `providers` array within `app/config/app.php`:

```
	'Bozboz\MediaLibrary\MediaLibraryServiceProvider',
	'Thapp\JitImage\JitImageServiceProvider'

```

3. Publish bozboz/media-library assets, migratons and configuration:

```
	./artisan config:publish bozboz/media-library
	./artisan asset:publish bozboz/media-library
	./artisan migrate:publish bozboz/media-library

```

4. Run `./artisan migrate`
5. Run `./artisan asset:publish bozboz/media-library`
6. Run `gulp`
7. Run `./artisan config:publish thapp/jitimage`
8. Open `app/config/packages/thapp/jitimage/config.php` and update with the following:

```
	use Bozboz\MediaLibrary\ImageFilters\Resize;
	use Bozboz\MediaLibrary\ImageFilters\ResizeAndCrop;

	return [
		...
		'recipes' => [
			'library' => new Resize(150, 0),
			'thumb' => new ResizeAndCrop(150, 150)
		]
	];

```

Making models "mediable"
------------------------

[](#making-models-mediable)

By default, only Pages will be mediable out of the box. You can define new media models inside `app/config/packages/bozboz/media-library/config.php`:

```
	'models' => [
		'Bozboz\Admin\Models\Page'
	]

```

General information
-------------------

[](#general-information)

This works by listening out for when a create/edit form is being built by using the MediaEventHandler subscriber. If the form being rendered is associated with a mediable model, a select box containing available Media is displayed to the user.

To get all Media instances for a given Page model, pass the Page model to Media::forModel(). This will return an instancce of Illuminate\\Database\\Eloquent\\Relations\\MorphToMany which contains the results. Actual model instances can be accessed by calling get() on the return value.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

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

Recently: every ~47 days

Total

9

Last Release

3948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c709396f3a6a7048c1c89615c6fce3f8301bd5715c641bf07b48268187727a3?d=identicon)[bozboz](/maintainers/bozboz)

---

Top Contributors

[![samdking](https://avatars.githubusercontent.com/u/1331514?v=4)](https://github.com/samdking "samdking (18 commits)")

### Embed Badge

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

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

PHPackages © 2026

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