PHPackages                             zing/laravel-eloquent-images - 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. [Database &amp; ORM](/categories/database)
4. /
5. zing/laravel-eloquent-images

ActiveLibrary[Database &amp; ORM](/categories/database)

zing/laravel-eloquent-images
============================

Manage images for Laravel eloquent

3.5.0(3mo ago)2655MITPHPPHP ^8.0

Since Oct 17Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/zingimmick/laravel-eloquent-images)[ Packagist](https://packagist.org/packages/zing/laravel-eloquent-images)[ Docs](https://github.com/zingimmick/laravel-eloquent-images)[ RSS](/packages/zing-laravel-eloquent-images/feed)WikiDiscussions 3.x Synced 3w ago

READMEChangelog (4)Dependencies (10)Versions (28)Used By (0)

Laravel Eloquent Images
=======================

[](#laravel-eloquent-images)

[![Latest Stable Version](https://camo.githubusercontent.com/897cc10ba3049896ec3f4bf90d80ea7a0fb9d36bcf27bf0599f4e376a7acd034/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d696d616765732f762f737461626c652e737667)](https://packagist.org/packages/zing/laravel-eloquent-images)[![Total Downloads](https://camo.githubusercontent.com/c7444f08acaba58342818089ca367672f3726fa248b8ead3ccf1618446754001/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d696d616765732f646f776e6c6f616473)](https://packagist.org/packages/zing/laravel-eloquent-images)[![Latest Unstable Version](https://camo.githubusercontent.com/f3379a540f06e7048562d42d980202e3f337dbaedac74dbb078841f641ce7cd3/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d696d616765732f762f756e737461626c652e737667)](https://packagist.org/packages/zing/laravel-eloquent-images)[![License](https://camo.githubusercontent.com/1f8f5fab10372108caa1f0706d38f5246f34c7c73999b25eb6d88e39be29aa36/68747470733a2f2f706f7365722e707567782e6f72672f7a696e672f6c61726176656c2d656c6f7175656e742d696d616765732f6c6963656e7365)](https://packagist.org/packages/zing/laravel-eloquent-images)

> **Requires [PHP 8.0+](https://php.net/releases/)**

Require Laravel Eloquent Images using [Composer](https://getcomposer.org):

```
composer require zing/laravel-eloquent-images
```

Usage
-----

[](#usage)

```
use Zing\LaravelEloquentImages\Tests\Models\Product;
use Zing\LaravelEloquentImages\Image;

$product = Product::query()->first();
// Add image(s) to model
$product->attachImage("https://avatars.githubusercontent.com/u/26657141");
$product->attachImages([
    "https://avatars.githubusercontent.com/u/26657141",
    Image::query()->first()
]);
// Remove image(s) from model
$product->detachImage("https://avatars.githubusercontent.com/u/26657141");
$product->detachImages([
    "https://avatars.githubusercontent.com/u/26657141",
    Image::query()->first()
]);
// Reset images of model
$product->syncImages([
    "https://avatars.githubusercontent.com/u/26657141",
    Image::query()->first()
]);
// Get images of model
$product->images;
// Eager load images
$products = Product::query()->with('images')->withCount('images')->get();
$products->each(function (Product $product){
    $product->images->dump();
    $product->images_count;
});
```

License
-------

[](#license)

Laravel Eloquent Images is an open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance79

Regular maintenance activity

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 67% 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 ~76 days

Recently: every ~279 days

Total

27

Last Release

109d ago

Major Versions

0.2.0 → 1.1.02021-07-21

1.x-dev → 2.0.02022-08-26

2.x-dev → 3.0.02022-11-05

PHP version history (4 changes)0.0.1PHP ^7.2

0.1.0PHP ^7.2 || ^8.0

2.0.0PHP ^7.3 || ^8.0

3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fafa5bffa28dcd722432b244bf3f0bfe773406df29fea295847e2397b95d50b?d=identicon)[zingimmick](/maintainers/zingimmick)

---

Top Contributors

[![zingimmick](https://avatars.githubusercontent.com/u/26657141?v=4)](https://github.com/zingimmick "zingimmick (77 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (27 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![kodiakhq[bot]](https://avatars.githubusercontent.com/in/29196?v=4)](https://github.com/kodiakhq[bot] "kodiakhq[bot] (5 commits)")

---

Tags

eloquentimageslaravellaraveleloquentimages

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zing-laravel-eloquent-images/health.svg)

```
[![Health](https://phpackages.com/badges/zing-laravel-eloquent-images/health.svg)](https://phpackages.com/packages/zing-laravel-eloquent-images)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M633](/packages/spatie-laravel-medialibrary)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)

PHPackages © 2026

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