PHPackages                             flipbox/image-controller - 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. flipbox/image-controller

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

flipbox/image-controller
========================

Image controller for laravel

0.0.4(9y ago)66155MITPHPPHP &gt;=5.6.4

Since Oct 26Pushed 9y ago4 watchersCompare

[ Source](https://github.com/flipboxstudio/image-controller)[ Packagist](https://packagist.org/packages/flipbox/image-controller)[ RSS](/packages/flipbox-image-controller/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (6)Used By (0)

Image Controller
================

[](#image-controller)

Controller your images for client request with size, quality, and extenstion with easy way. You no longer need to create an image with multiple sizes, this package is already handling request images with size needed,

Features
--------

[](#features)

- Dynamic images request file
- Controller image size
- Controller image quality
- Controller image extension
- Cache image

Required
--------

[](#required)

- php &gt;= 5.6.4
- laravel/framework 5.3.\*
- intervention/image ^2.3
- intervention/imagecache ^2.3

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

[](#installation)

Require this package with composer:

```
composer require flipbox/image-controller

```

Add the ServiceProvider to the providers array in config/app.php

```
Flipbox\ImageController\ImageControllerServiceProvider::class,

```

Add the facade of this package to the $aliases array config/app.php

```
'ImageController' => Flipbox\ImageController\Facade::class

```

Copy the package resource to your application with the publish command:

```
php artisan vendor:publish

```

your image ready to control :-)

Using package
-------------

[](#using-package)

To avoid clashed request, we suggest you to add a little code to the end of your `.htaccess` file in public laravel folder

```
RewriteRule .*\.(jpg|png|gif|tif|bmp)$ index.php [NC,L]

```

create folder `images` to your public folder (however you can change name of folder in config file), and put image to that folder, for example you put image with file name a `photo.jpg`, and you can access your photo as usual `http://localhost/images/photo.jpg`.

### Request with size

[](#request-with-size)

Now you can request image with specify size (`thumbnail`,`small`,`medium`,`large`)

`http://localhost/images/photo.jpg?size=thumbnail` default width 100px
`http://localhost/images/photo.jpg?size=small` default width 240px
`http://localhost/images/photo.jpg?size=medium` default width 500px
`http://localhost/images/photo.jpg?size=large` default width 1024px

### Request with specify width or height

[](#request-with-specify-width-or-height)

Also you can request image with specify width or height or event both
`http://localhost/images/photo.jpg?width=320` auto height
`http://localhost/images/photo.jpg?height=320` auto width
`http://localhost/images/photo.jpg?width=100&height=320` fixed width and height

### Request with another extension

[](#request-with-another-extension)

Real file extension will be ignored, now you can access your images file with extensions that defined in config or even with no extension
`http://localhost/images/photo` valid by default
`http://localhost/images/photo.jpg` valid by default
`http://localhost/images/photo.png` valid by default
`http://localhost/images/photo.gif` valid by default

### Uploaded file

[](#uploaded-file)

We provide uploader file that make upload file very easy. First parameter is [UploadedFile](https://laravel.com/api/5.2/Illuminate/Http/UploadedFile.html) or [Base64 Encoding](https://en.wikipedia.org/wiki/Base64), and second parameter is `directory/prefix.`

```
ImageController::upload($request->file, 'profile');

```

this method will be return string of generated filename `str_random(34)`

### Model Assesor

[](#model-assesor)

Add [model accesor](https://laravel.com/docs/5.2/eloquent-mutators#accessors-and-mutators) to generate image link.

```
	/**
	 * Get ProfilePicture.
	 *
	 * @param  string  $value
	 * @return string
	 */
	public function getProfilePictureAttribute($value)
	{
		return ImageController::generateImageUrl($value, 'small');
	}

```

### ToDo

[](#todo)

- Add Watermark
- Test

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~49 days

Total

4

Last Release

3340d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5585ab7e83e92b16ebfde64d7d90ff330721bcb1fbfa193fb0ffe149a4b3a7d1?d=identicon)[krisanalfa](/maintainers/krisanalfa)

![](https://www.gravatar.com/avatar/7a17b7989691f234e4ee26c5535d1ba2f03fd67486d0dd02e9359daab7af3d88?d=identicon)[flipbox](/maintainers/flipbox)

---

Top Contributors

[![denmasyarikin](https://avatars.githubusercontent.com/u/18554343?v=4)](https://github.com/denmasyarikin "denmasyarikin (5 commits)")[![mul14](https://avatars.githubusercontent.com/u/113989?v=4)](https://github.com/mul14 "mul14 (1 commits)")

---

Tags

image-resizerlaravellaravel-5-packagephp

### Embed Badge

![Health badge](/badges/flipbox-image-controller/health.svg)

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

###  Alternatives

[justbetter/statamic-image-optimize

Image optimization after upload

1315.2k](/packages/justbetter-statamic-image-optimize)

PHPackages © 2026

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