PHPackages                             proshore/laravel-image-upload - 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. proshore/laravel-image-upload

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

proshore/laravel-image-upload
=============================

Easy image upload and thumbnail management

68512PHP

Since Sep 7Pushed 9y ago2 watchersCompare

[ Source](https://github.com/proshore/laravel-image-upload)[ Packagist](https://packagist.org/packages/proshore/laravel-image-upload)[ RSS](/packages/proshore-laravel-image-upload/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

LARAVEL IMAGE
=============

[](#laravel-image)

Basic image upload and thumbnail management package for laravel5.

Installation
------------

[](#installation)

First, pull in the package through Composer.

```
"require": {
    "proshore/laravel-image-upload": "dev-master"
}
```

And then, if using Laravel 5, include the service provider within `config/app.php`.

```
'providers' => [
    LaravelImage\ImageUploadServiceProvider::class,
];
```

And, for convenience, add a facade alias to this same file at the bottom:

```
'aliases' => [
    'ImageHelper' => LaravelImage\Image::class,
];
```

Finally publish the configuration

```
php artisan vendor:publish --provider="LaravelImage\ImageUploadServiceProvider"
```

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

[](#configuration)

You can add default thumbnail configuration to `config/laravelimage.php`.

Usage
-----

[](#usage)

#### Uploading Image

[](#uploading-image)

Within your controllers, get access to image upload service via dependency injection

```
class ContentsController extends Controller
{
    ...

    protected $file;

    /**
     * @param ImageUploadService $file
     */
    public function __construct(ImageUploadService $file)
    {
        ...

        //set properties for file upload
        $this->file = $file;
        $this->file->setUploadField('image'); //default is image
        $this->file->setUploadFolder('contents'); //default is public/uploads/contents
    }

    ...
```

And then, in your store or update method you can perform image upload

```
/**
 * Store method
 */
public function store(ContentRequest $request)
{
    $input = $request->all();

    if (Input::hasFile('image') && $this->file->upload()) {
        //file is uploaded, get uploaded file info
        $uploadedFileInfo = $this->file->getUploadedFileInfo();

        ...
        //do whatever you like with the information
        $input = array_merge($input, $uploadedFileInfo);
    }

    ...
}

/**
 * Update method
 */
public function update(Request $request, $id)
{
    ...

    if (Input::hasFile('image') && $this->file->upload()) {
        ...

        //remove old files
        if ( ! empty($model->file_path)) {
            $this->file->clean(public_path($model->file_path), true);
        }
    }

    ...
}
```

#### Using facade to display images

[](#using-facade-to-display-images)

Display from already registered thumbnails. It will try to generate new thumb if registered thumbnail doesn't exist.

```
{!!
    \LaravelImage\LaravelImage::image($model->file_path, $model->image, [
        'alt' => $model->original_file_name,
        'size' => 'thumb'
    ])
!!}
```

Or, create image of custom size at runtime

```
{!!
    \LaravelImage\LaravelImage::image($model->file_path, $model->image, [
        'alt' => $model->original_file_name,
        'size' => [
            'custom' => ['w' => 300, 'h' => 200, 'crop' => true]
        ]
    ])
!!}
```

TODO
----

[](#todo)

- Image cache implementation
- Complete documentation

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

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/22026481?v=4)[Proshore](/maintainers/proshore)[@proshore](https://github.com/proshore)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/proshore-laravel-image-upload/health.svg)

```
[![Health](https://phpackages.com/badges/proshore-laravel-image-upload/health.svg)](https://phpackages.com/packages/proshore-laravel-image-upload)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135931.0k3](/packages/goat1000-svggraph)[jasny/audio

Process audio files using SoX

524.8k](/packages/jasny-audio)[yk/laravel-ocr

A wrapper for gocr.

1356.6k](/packages/yk-laravel-ocr)

PHPackages © 2026

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