PHPackages                             kandysoft/media-kit - 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. kandysoft/media-kit

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

kandysoft/media-kit
===================

Storage-agnostic media library for Laravel: uploads, per-locale captions and on-demand image variants on top of the framework's filesystem disks.

v1.0.0(today)00MITPHPPHP ^8.4CI passing

Since Aug 1Pushed todayCompare

[ Source](https://github.com/TheKandySoft/media-kit)[ Packagist](https://packagist.org/packages/kandysoft/media-kit)[ Docs](https://github.com/kandysoft/media-kit)[ RSS](/packages/kandysoft-media-kit/feed)WikiDiscussions main Synced today

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

MediaKit
========

[](#mediakit)

A media library for Laravel that stores files on **your** disks. Uploads, per-locale captions and on-demand image variants — with no storage abstraction of its own to get in the way.

```
composer require kandysoft/media-kit
php artisan migrate
```

Storage
-------

[](#storage)

Anything in `config/filesystems.php` works: local, S3, MinIO, Google Cloud, whatever the host has configured. Point the package at one:

```
MEDIA_KIT_DISK=public
MEDIA_KIT_DIRECTORY=media
```

A disk counts as public when it declares `'visibility' => 'public'`. Public files get a permanent URL from the disk; private files get a temporary one, or a signed route that streams through the application when the driver cannot mint temporary URLs.

Writing
-------

[](#writing)

```
use KandySoft\MediaKit\Contracts\MediaWriter;
use KandySoft\MediaKit\Data\MediaCaption;
use KandySoft\MediaKit\Data\MediaUpload;

public function __construct(private readonly MediaWriter $media) {}

$this->media->sync($product, [
    MediaUpload::file($request->file('photo'), tag: 'gallery', captions: [
        new MediaCaption('en', alt: 'Front view'),
        new MediaCaption('uk', alt: 'Вигляд спереду'),
    ]),
    MediaUpload::keep($existingUuid, tag: 'gallery'),
]);
```

Anything not in the list is deleted, together with the variants generated from it. A file needs no owner at all — `store()` with `$model = null` keeps it standalone under its tag.

Replacing keeps the UUID, so links and stored references survive:

```
$this->media->replace($logo->uuid, $request->file('logo'));
```

Reading
-------

[](#reading)

```
use KandySoft\MediaKit\Contracts\MediaReader;
use KandySoft\MediaKit\Data\ImageSize;
use KandySoft\MediaKit\Data\MediaFilter;

$images = $reader->forModel(
    $product,
    MediaFilter::images(captionLocale: 'uk', withFallback: true),
    ImageSize::of(800, 600),
);

$images[0]->url;                       // the original
$images[0]->variant('medium')?->url;   // signed, generated on first request
$images[0]->caption?->alt;
```

Reads return `MediaResource` objects, never models or loose arrays. The disk, the path and the owning model stay inside the package.

Facade or injection
-------------------

[](#facade-or-injection)

The facades resolve the very same singletons the container injects, so both styles are equivalent:

```
MediaRead::forModel($product);            // facade
app(MediaReader::class)->forModel($product);  // container
```

Identity
--------

[](#identity)

Files are addressed by UUID, everywhere. There is no auto-increment key — not in the schema, not in URLs, not in the payloads clients receive.

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

[](#configuration)

`php artisan vendor:publish --tag=media-kit-config` for the full file. The interesting parts:

KeyPurpose`disk`, `directory`where files land`image.driver``gd` or `imagick``image.variants`named multipliers of the requested size`temporary_url_ttl`, `variant_url_ttl`link lifetimes, in minutes`routes.enabled`, `routes.prefix`, `routes.middleware`serving endpoints, or none at allCommands
--------

[](#commands)

```
php artisan media:show      # what a client would receive
php artisan media:adopt           # register files already on a disk
```

Documentation
-------------

[](#documentation)

- [docs/usage.md](docs/usage.md) — attaching, replacing, reading, copying, fallbacks
- [docs/storage.md](docs/storage.md) — disks, visibility, variants, serving routes
- [CHANGELOG.md](CHANGELOG.md)

License
-------

[](#license)

MIT — see [LICENSE](LICENSE) and [NOTICE](NOTICE).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

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

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e5dd4d43a6d3c92b868b54a9bcd366627e94f3d1479262f9130c5b040a8bfd9?d=identicon)[TheKandySoft](/maintainers/TheKandySoft)

---

Top Contributors

[![TheKandySoft](https://avatars.githubusercontent.com/u/127942823?v=4)](https://github.com/TheKandySoft "TheKandySoft (2 commits)")

---

Tags

filesystemlaravelimagesmediauploads

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kandysoft-media-kit/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.8k2.5k](/packages/unopim-unopim)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.9k175.2k9](/packages/bagisto-bagisto)[code16/sharp

Laravel Content Management Framework

79266.1k10](/packages/code16-sharp)[mostafaznv/larupload

Larupload is a ORM based file uploader for laravel to upload image, video, audio and other known files.

75487.1k6](/packages/mostafaznv-larupload)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

12115.1k54](/packages/kompo-kompo)[slimani/filament-media-manager

A media manager plugin for Filament.

179.7k1](/packages/slimani-filament-media-manager)

PHPackages © 2026

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