PHPackages                             jjdyo/j-laravel-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. jjdyo/j-laravel-media-manager

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

jjdyo/j-laravel-media-manager
=============================

A media manager package for Laravel with Vue.js frontend

v1.0.0(5mo ago)02MITPHPPHP ^8.1|^8.2|^8.3

Since Dec 3Pushed 5mo agoCompare

[ Source](https://github.com/jjdyo/JLaravelMediaManager)[ Packagist](https://packagist.org/packages/jjdyo/j-laravel-media-manager)[ RSS](/packages/jjdyo-j-laravel-media-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

J-Laravel Media Manager
=======================

[](#j-laravel-media-manager)

[![Media Picker Demo](.github/assets/JLaravelMediaManager.gif)](.github/assets/JLaravelMediaManager.gif)

Laravel media library with a Vue 3 picker modal, upload with duplicate detection, directory browsing, and safe thumbnailing. Designed to be installed via Composer and integrated into your existing Laravel app.

[![Picker Interface](.github/assets/JLaravelMediaManagerScreenshot.png)](.github/assets/JLaravelMediaManagerScreenshot.png)

Requirements
------------

[](#requirements)

- PHP: ^8.1
- Laravel: ^10 | ^11 | ^12
- Intervention Image: ^2.7 | ^3.0
- Optional: spatie/laravel-permission (if you want role-based directory access)

Quick start
-----------

[](#quick-start)

1. Install the package

```
composer require jjdyo/j-laravel-media-manager

```

2. Publish assets, config, and migrations (choose any/all tags)

```
php artisan vendor:publish --provider="Jjdyo\MediaManager\MediaManagerServiceProvider" --tag=media-manager-config
php artisan vendor:publish --provider="Jjdyo\MediaManager\MediaManagerServiceProvider" --tag=media-manager-migrations
php artisan vendor:publish --provider="Jjdyo\MediaManager\MediaManagerServiceProvider" --tag=media-manager-assets

```

3. Configure environment (optional defaults shown) Add to your `.env` (or keep defaults from the config file):

```
MEDIA_MAX_FILE_SIZE=5MB
MEDIA_ENFORCE_SPATIE=false
MEDIA_DISK=public
MEDIA_THUMB_MAX_PIXELS=40000000
MEDIA_THUMB_MAX_SIZE=20971520

```

4. Prepare storage and database

```
php artisan storage:link
php artisan migrate

```

5. Routes are auto-registered This package loads its routes for you (behind `auth`).
6. Frontend build

- We publish Vue components and a small composable to `resources/js/vendor/media-manager`.
- Import the components into your app and build with Vite as usual.

Example import and usage:

```
// In a Vue page/component

import MediaPicker from '@/vendor/media-manager/components/media/MediaPicker.vue'
function onMediaSelected(m) { /* save m.path, preview m.thumbnails_urls?.['256'] */ }

```

What you get
------------

[](#what-you-get)

- Configurable directories (roots with labels) + dynamic subfolder scanning
- Optional role-guarded access per root (Spatie roles)
- Uploads with SHA‑256 duplicate detection (offers "use existing")
- Memory‑aware thumbnailing with safety limits (64px, 256px JPEG)
- Logs: dedupe hits, thumbnail preflight estimates, risk‑based skips, timings
- Folder creation with sanitized names and enforced nesting depth
- Vue 3 modal picker with Folder/All tabs, search, pagination, per‑page selector, upload with CSRF, duplicate handling

Configuration
-------------

[](#configuration)

File: `config/media-manager.php` (after publish)

- `max_file_size` (e.g., `500KB`, `5MB`, `1GB`)
- `allowed_directories` (root keys with labels)
- `scan_depth` and `allowed_folder_nest`
- `thumbnails` (sizes as `[w,h,quality]`), `thumbnail_max_pixels`, `thumbnail_max_filesize_bytes`
- `disk`, `visibility`
- `enforce_spatie_permission` and per-root `permissions`

If you enable Spatie enforcement, only users with configured roles can use a root. Otherwise, any authenticated user can.

Getting started in your app
---------------------------

[](#getting-started-in-your-app)

1. Add the CSRF meta tag to your layout so uploads succeed:

```

```

2. Show the picker and save the selection in a form

```

```

3. Store the relative path and compute the public URL server-side

```
$url = Storage::disk('public')->url($model->logo_path);

```

See `USAGE.md` for full end-to-end examples (Trainer photo + Site logo), including validation rules and controller snippets.

Testing the installation
------------------------

[](#testing-the-installation)

Use this quick checklist to verify everything is wired correctly:

- Visit `/media` authenticated; directories load and pagination works
- Upload a large phone photo; a 256px thumbnail should appear and logs should show a thumbnail run
- Try uploading the same file again; you should see a duplicate detection flow
- Create a folder; name should be sanitized; depth limits respected
- If `MEDIA_ENFORCE_SPATIE=true`, ensure roles restrict roots as expected

Frontend paths and Vite aliases
-------------------------------

[](#frontend-paths-and-vite-aliases)

Assets are published to `resources/js/vendor/media-manager`. If your Vite alias `@` points to `resources/js`, then imports like `@/vendor/media-manager/components/media/MediaPicker.vue` will work. Adjust paths if your alias differs.

Support &amp; logging
---------------------

[](#support--logging)

Check `storage/logs/laravel.log` for detailed upload and thumbnail logs.

Packagist
---------

[](#packagist)

[J-Laravel Media Manager](https://packagist.org/packages/jjdyo/j-laravel-media-manager)

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance72

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Unknown

Total

1

Last Release

160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/844db4df6d38fa73712317f8864d791b75946ee4417fcdeb3db22a950ee634c8?d=identicon)[jjdyo](/maintainers/jjdyo)

---

Top Contributors

[![jjdyo](https://avatars.githubusercontent.com/u/63560773?v=4)](https://github.com/jjdyo "jjdyo (8 commits)")

---

Tags

laravelimagemanagermediauploadvue

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jjdyo-j-laravel-media-manager/health.svg)

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

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[itskodinger/midia

Simple Media manager for your Laravel project

1415.8k](/packages/itskodinger-midia)

PHPackages © 2026

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