PHPackages                             phuclh/media-manager - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. phuclh/media-manager

ActiveLibrary[File &amp; Storage](/categories/file-storage)

phuclh/media-manager
====================

A media manager to upload media files to multiple storages or select image from Unsplash, URL

0.0.2(4y ago)2807[1 issues](https://github.com/phuclh/media-manager/issues)[2 PRs](https://github.com/phuclh/media-manager/pulls)MITPHPPHP ^8.0

Since Mar 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phuclh/media-manager)[ Packagist](https://packagist.org/packages/phuclh/media-manager)[ Docs](https://github.com/phuclh/media-manager)[ GitHub Sponsors](https://github.com/phuclh)[ RSS](/packages/phuclh-media-manager/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (12)Versions (5)Used By (0)

Livewire Media Manager
======================

[](#livewire-media-manager)

[![Latest Version on Packagist](https://camo.githubusercontent.com/825b517fd2099a4e9660ca7d83ca1ef4b34322e3846cfe54c1a1f55e254c0e96/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706875636c682f6d656469612d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phuclh/media-manager)[![GitHub Tests Action Status](https://camo.githubusercontent.com/b50eb0a1df238a04f6facaefb3ca6c0fae1701740a5c1a8c83b751ac407165f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f706875636c682f6d656469612d6d616e616765722f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/phuclh/media-manager/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/0873a7393cc0fe0f2b37c97d09afbd695364b573abbd6137a9ee17f3ddd4f841/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f706875636c682f6d656469612d6d616e616765722f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/phuclh/media-manager/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/28840b52ffda6d8f4a1f5e412e7da9355d479de233418d979681a8bd0f01bcc6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706875636c682f6d656469612d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phuclh/media-manager)

A TALL Stack Media Manager to upload media files to multiple storages or select image from Unsplash, URL

    CleanShot.2022-03-22.at.22.24.51.mp4    Installation
------------

[](#installation)

You can install the package via composer:

```
composer require phuclh/media-manager
```

Add Tailwind CSS classes in `tailwind.config.js`:

```
module.exports = {
    content: [
        ...
        './vendor/phuclh/media-manager/resources/views/**/*.blade.php',
    ]
};
```

You can publish the config file with:

```
php artisan vendor:publish --tag="media-manager-config"
```

This is the contents of the published config file:

```
return [
    'storage'    => [
        'disk' => 'public'
    ],

    'image' => [
        'allowed_file_types' => ['png', 'jpg', 'jpeg', 'gif'],

        /*
         * Max file size in KB.
         */
        'max_file_size'      => 5000,
    ],

    'unsplash' => [
        'access_key' => env('UNSPLASH_ACCESS_KEY'),

        'utm_source' => env('APP_NAME')
    ]
];
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="media-manager-views"
```

How to open Media Manager modal
-------------------------------

[](#how-to-open-media-manager-modal)

### Via Alpinejs

[](#via-alpinejs)

```
this.$wire.emitTo(
    'media-manager',
    'media-manager:show',
    {
        id: 'featured-image',
        file: null,
        metadata: null
    }
);
```

### From Livewire Component

[](#from-livewire-component)

```
use Phuclh\MediaManager\WithMediaManager;

...

public function showUploader()
{
    $this->showFileManager('featured-image', $file, $metadata);
}
```

You can pass file URL as 2nd parameter so the Media Manager will show that file by default.

Remove File from Media Manager
------------------------------

[](#remove-file-from-media-manager)

```
use Phuclh\MediaManager\WithMediaManager;

...

public function removeFeaturedImage()
{
    $this->image = null;

    $this->removeFileFromMediaManager();
}
```

Events
------

[](#events)

**File Selected**

When a media file is selected, it will dispatch an event, called `media-manager:file-selected`

You can listen on that event by using AlpineJS like this:

```
x-on:media-manager:file-selected.window="setImage"
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [phucle](https://github.com/phuclh)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

2

Last Release

1560d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4266b3a5a108beea54b059cba17d0f10e64ddb35e7e9a3bf49c6e6b8060d672d?d=identicon)[phuclh](/maintainers/phuclh)

---

Top Contributors

[![phuclh](https://avatars.githubusercontent.com/u/6707194?v=4)](https://github.com/phuclh "phuclh (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (10 commits)")

---

Tags

laravelMedia Managerphuclh

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/phuclh-media-manager/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M46](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M97](/packages/dedoc-scramble)[filament/support

Core helper methods and foundation code for all Filament packages.

2331.0M244](/packages/filament-support)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k37](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

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