PHPackages                             skygdi/product-image - 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. skygdi/product-image

ActiveLibrary[Image &amp; Media](/categories/media)

skygdi/product-image
====================

product image

2111PHP

Since May 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/skygdi/ProductImage)[ Packagist](https://packagist.org/packages/skygdi/product-image)[ RSS](/packages/skygdi-product-image/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

### Quick Product Image class (product id , name and description) base on Spatie\\MediaLibrary for Laravel

[](#quick-product-image-class-product-id--name-and-description-base-on-spatiemedialibrary-for-laravel)

1.Install:

```
composer require skygdi/product-image
```

2.Public migration files:

```
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider"
php artisan vendor:publish --provider="skygdi\ProductImage\ProductImageProvider"
```

3.Migrate

```
php artisan migrate
```

Change the #order\_id input and #order\_total value as your logic needed before clicking the paypal checkout button.

4.Usage:

```
use skygdi\ProductImage\model\ProductImage as ProductImage;
//In relation model define:
return $this->hasMany('skygdi\ProductImage\model\ProductImage','product_id');

//create
ProductImage::create([
  "product_id"    =>  1,
  "description"   =>  "description",
  "sort_index"    =>  1
]);

//Update or add an image:
ProductImage::find(1)->UploadImage($request->file('new_image'));

//Delete (include image if exist)
ProductImage::find(1)->delete();

//Retrieve image URL
ProductImage::find(1)->ImageUrl();
```

5.Testing: The fast test URL: yourUrl/skygdi/pi/test, or you could write on your own.

```
Route::get('/', function () {
    //Creating
    ProductImage::create([
        "product_id"    =>  1,
        "description"   =>  "description",
        "sort_index"    =>  1
    ]);
    */

    $pi = ProductImage::find(1);
    //$pi->UploadImage( storage_path('app/file.jpg') ); //From local file
    //$pi->UploadImage( $request->file('new_image') );  //From upload form
    //$pi->UploadImageFromUrl("https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png");    //From Internet
    echo "";
});
```

---

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20422201?v=4)[Peter George](/maintainers/skygdi)[@skygdi](https://github.com/skygdi)

---

Top Contributors

[![skygdi](https://avatars.githubusercontent.com/u/20422201?v=4)](https://github.com/skygdi "skygdi (9 commits)")

### Embed Badge

![Health badge](/badges/skygdi-product-image/health.svg)

```
[![Health](https://phpackages.com/badges/skygdi-product-image/health.svg)](https://phpackages.com/packages/skygdi-product-image)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

133890.0k3](/packages/goat1000-svggraph)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

12644.1k2](/packages/gravatarphp-gravatar)

PHPackages © 2026

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