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(1mo ago)2655MITPHPPHP ^8.0

Since Oct 17Pushed 1mo 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 4d 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

48

—

FairBetter than 94% of packages

Maintenance89

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity69

Established project with proven stability

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

58d 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)

---

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

[cviebrock/eloquent-sluggable

Easy creation of slugs for your Eloquent models in Laravel

4.0k13.6M253](/packages/cviebrock-eloquent-sluggable)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.

1.1k651.8k11](/packages/cybercog-laravel-ban)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k302.7k1](/packages/cybercog-laravel-love)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)

PHPackages © 2026

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