PHPackages                             imagina/media-module - 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. imagina/media-module

ActiveLaravel-module[Image &amp; Media](/categories/media)

imagina/media-module
====================

Imagina imedia laravel module

10.0.0(1y ago)02.6k9MITPHPPHP ^8.1

Since Dec 7Pushed 6mo agoCompare

[ Source](https://github.com/imagina/imaginacms-imedia)[ Packagist](https://packagist.org/packages/imagina/media-module)[ RSS](/packages/imagina-media-module/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (10)Versions (94)Used By (0)

imaginacms-imedia
=================

[](#imaginacms-imedia)

Private Files Configurations
----------------------------

[](#private-files-configurations)

```
- The bucker must have the permissions configured correctly
- Read and write should be set only for the allowed user

```

Implementation with Modules
---------------------------

[](#implementation-with-modules)

### In the Entity (Models/Entity)

[](#in-the-entity-modelsentity)

- Add Events

```
 public array $dispatchesEventsWithBindings = [
    'created' => [['path' => 'Modules\Imedia\Events\CreateMedia']],
    'creating' => [],
    'updated' => [['path' => 'Modules\Imedia\Events\UpdateMedia']],
    'updating' => [],
    'deleting' => [['path' => 'Modules\Imedia\Events\DeleteMedia']],
    'deleted' => []
];
```

- Add the zones

```
/**
* Media Fillable
*/
public $mediaFillable = [
    'mainimage' => 'single'
];
```

- Add relation:

```
/**
* Relation Media
* Make the Many To Many Morph
*/
public function files()
{
    if (isModuleEnabled('Imedia')) {
        return app(\Modules\Imedia\Relations\FilesRelation::class)->resolve($this);
    }
    return new \Imagina\Icore\Relations\EmptyRelation();
}
```

### In Transformer (Transformers/EntityTransformer)

[](#in-transformer--transformersentitytransformer)

- Add relation with files

```
//Implementation with Media
 return [
    'files' => $this->whenLoaded('files', fn() => $this->files->byZones($this->mediaFillable, $this)),
];
```

### Endpoint | Attributes Example

[](#endpoint--attributes-example)

- To Media single , add zone and file id.

```
attributes[medias_single][$zone] = $fileId

```

Example: Zone = mainimage

```
attributes[medias_single][mainimage] = 1

```

- To Media gallery, add zone and files array ids.

```
attributes[medias_multi][$zone][files][] = $fileId

```

Example: Zone = gallery

```
attributes[medias_multi][gallery][files][] = 1
attributes[medias_multi][gallery][files][] = 2

```

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance51

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 77.7% 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 ~43 days

Recently: every ~652 days

Total

93

Last Release

208d ago

Major Versions

0.1.0-beta.1 → 1.3.12015-07-07

1.26.0 → 2.0.02017-06-13

2.6.0 → 3.0.02017-09-16

3.6.1 → 10.0.02024-06-11

v8.x-dev → v12.x-dev2025-10-21

PHP version history (5 changes)1.2.0PHP &gt;=5.4

2.0.0PHP &gt;=5.5

3.0.0PHP &gt;=7.0.0

10.0.0PHP ^8.1

v8.x-devPHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bc4bd5d733cfbe7e145670fbb1539bdb8d33f43c2cca4f26a119d37dfbad62f?d=identicon)[imagina](/maintainers/imagina)

---

Top Contributors

[![nWidart](https://avatars.githubusercontent.com/u/882397?v=4)](https://github.com/nWidart "nWidart (1392 commits)")[![JCEC007](https://avatars.githubusercontent.com/u/7571125?v=4)](https://github.com/JCEC007 "JCEC007 (134 commits)")[![CristianMarin19](https://avatars.githubusercontent.com/u/54483189?v=4)](https://github.com/CristianMarin19 "CristianMarin19 (67 commits)")[![imagina](https://avatars.githubusercontent.com/u/758247?v=4)](https://github.com/imagina "imagina (50 commits)")[![mikemand](https://avatars.githubusercontent.com/u/745184?v=4)](https://github.com/mikemand "mikemand (32 commits)")[![msolanoimagina](https://avatars.githubusercontent.com/u/121646384?v=4)](https://github.com/msolanoimagina "msolanoimagina (21 commits)")[![msolanogithub](https://avatars.githubusercontent.com/u/38920570?v=4)](https://github.com/msolanogithub "msolanogithub (19 commits)")[![willvrd](https://avatars.githubusercontent.com/u/8865099?v=4)](https://github.com/willvrd "willvrd (11 commits)")[![TJULIAN-D](https://avatars.githubusercontent.com/u/65859890?v=4)](https://github.com/TJULIAN-D "TJULIAN-D (10 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (8 commits)")[![msolanorenuity](https://avatars.githubusercontent.com/u/121646154?v=4)](https://github.com/msolanorenuity "msolanorenuity (7 commits)")[![moebrowne](https://avatars.githubusercontent.com/u/8448512?v=4)](https://github.com/moebrowne "moebrowne (6 commits)")[![pralhadstha](https://avatars.githubusercontent.com/u/6309194?v=4)](https://github.com/pralhadstha "pralhadstha (4 commits)")[![IMNicolasM](https://avatars.githubusercontent.com/u/143624699?v=4)](https://github.com/IMNicolasM "IMNicolasM (3 commits)")[![odchunzag](https://avatars.githubusercontent.com/u/43626463?v=4)](https://github.com/odchunzag "odchunzag (3 commits)")[![adrianacardoso](https://avatars.githubusercontent.com/u/39056746?v=4)](https://github.com/adrianacardoso "adrianacardoso (2 commits)")[![arturmamedov](https://avatars.githubusercontent.com/u/2785707?v=4)](https://github.com/arturmamedov "arturmamedov (2 commits)")[![joestrong](https://avatars.githubusercontent.com/u/1587455?v=4)](https://github.com/joestrong "joestrong (2 commits)")[![JulienTant](https://avatars.githubusercontent.com/u/785518?v=4)](https://github.com/JulienTant "JulienTant (2 commits)")[![kay899](https://avatars.githubusercontent.com/u/3104135?v=4)](https://github.com/kay899 "kay899 (2 commits)")

---

Tags

libraryfilesmediaThumbnailsfiltersasgardcms

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/imagina-media-module/health.svg)

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

###  Alternatives

[asgardcms/media-module

Media module for AsgardCMS. Handles the media library.

1130.6k2](/packages/asgardcms-media-module)[talvbansal/media-manager

A media browser and uploader for laravel apps written in vue js and bootstrap

20827.7k4](/packages/talvbansal-media-manager)[mariojgt/witchcraft

A Laravel Package Witchcraft, a quick start for new laravel Packages

312.6k](/packages/mariojgt-witchcraft)

PHPackages © 2026

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