PHPackages                             approached/laravel-image-optimizer - 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. approached/laravel-image-optimizer

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

approached/laravel-image-optimizer
==================================

Image optimizer for laravel

2.3.0(9y ago)153143.5k↓50%32[3 issues](https://github.com/approached/laravel-image-optimizer/issues)MITPHP

Since Jun 25Pushed 8y ago9 watchersCompare

[ Source](https://github.com/approached/laravel-image-optimizer)[ Packagist](https://packagist.org/packages/approached/laravel-image-optimizer)[ Docs](https://github.com/approached/laravel-image-optimizer)[ RSS](/packages/approached-laravel-image-optimizer/feed)WikiDiscussions master Synced 1mo ago

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

This package is now **deprecated**. I prefer to use [spatie/image-optimizer](https://github.com/spatie/image-optimizer) package. Because this code is better structured.

---

Laravel Imageoptimizer
======================

[](#laravel-imageoptimizer)

[![License](https://camo.githubusercontent.com/4becde0cf5d9f8e611149453c0ce14e0b411471d40c156a2cb2fb90c8eaa5880/68747470733a2f2f706f7365722e707567782e6f72672f617070726f61636865642f6c61726176656c2d696d6167652d6f7074696d697a65722f6c6963656e7365)](https://packagist.org/packages/approached/laravel-image-optimizer)[![Latest Stable Version](https://camo.githubusercontent.com/dc60572202ce3185f77ed839a32ebdf6e9e2221237b491c32590343b89042206/68747470733a2f2f706f7365722e707567782e6f72672f617070726f61636865642f6c61726176656c2d696d6167652d6f7074696d697a65722f762f737461626c65)](https://packagist.org/packages/approached/laravel-image-optimizer)[![Total Downloads](https://camo.githubusercontent.com/71494825bd36b8413bcb3817210bc29d541bf85b5b6ff1919af3cff31a684098/68747470733a2f2f706f7365722e707567782e6f72672f617070726f61636865642f6c61726176656c2d696d6167652d6f7074696d697a65722f646f776e6c6f616473)](https://packagist.org/packages/approached/laravel-image-optimizer)[![Build Status](https://camo.githubusercontent.com/bf33958beeca6d279d89553a3494e2829ee74d31810d84568a73b734ae414e21/68747470733a2f2f7472617669732d63692e6f72672f617070726f61636865642f6c61726176656c2d696d6167652d6f7074696d697a65722e737667)](https://travis-ci.org/approached/laravel-image-optimizer)

With this package you can easy optimize your image in **laravel 5.x** or **lumen**. Read the google instruction  about image optimize.

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

[](#installation)

Recommend convert packages:

```
sudo apt-get install pngquant gifsicle jpegoptim
```

- Require this package with composer:

```
composer require approached/laravel-image-optimizer

```

- After updating composer, add the ServiceProvider to the providers array in `config/app.php`

```
Approached\LaravelImageOptimizer\ServiceProvider::class,
```

- Copy the package config to your local config with the publish command:

```
php artisan vendor:publish --tag=imageoptimizer

```

Usage
-----

[](#usage)

### Automatic ([middleware](https://laravel.com/docs/5.4/middleware))

[](#automatic-middleware)

If you want to run the ImageOptimizer automatically for all the uploaded images:

```
Route::post('admin/image/upload', function () {
    $picture = $request->file('picture');

   ...
})->middleware('AutoImageOptimizer');
```

### Manual

[](#manual)

On uploading a file:

```
public function store(Request $request, ImageOptimizer $imageOptimizer)
    {
        $picture = $request->file('picture');

        // optimize
        $imageOptimizer->optimizeUploadedImageFile($picture);

        // save
        Storage::put('/my/cool/path/test.jpg', File::get($picture));

        ...
    }
```

Extension
---------

[](#extension)

- On-demand image manipulation [alcodo/powerimage](https://github.com/alcodo/powerimage)

License
-------

[](#license)

MIT

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 85.5% 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 ~60 days

Recently: every ~48 days

Total

11

Last Release

3371d ago

Major Versions

1.0.0 → 2.0.02016-02-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/0472dc30fb5080c1ea5c4b46ef871bff216e476fed894731242b0fb3c69e6c2a?d=identicon)[approached](/maintainers/approached)

---

Top Contributors

[![approached](https://avatars.githubusercontent.com/u/3439330?v=4)](https://github.com/approached "approached (71 commits)")[![ctf0](https://avatars.githubusercontent.com/u/7388088?v=4)](https://github.com/ctf0 "ctf0 (4 commits)")[![danjdewhurst](https://avatars.githubusercontent.com/u/25198612?v=4)](https://github.com/danjdewhurst "danjdewhurst (1 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (1 commits)")[![pablood85](https://avatars.githubusercontent.com/u/1504797?v=4)](https://github.com/pablood85 "pablood85 (1 commits)")[![rasim](https://avatars.githubusercontent.com/u/983327?v=4)](https://github.com/rasim "rasim (1 commits)")[![rdok-pigogo](https://avatars.githubusercontent.com/u/20552924?v=4)](https://github.com/rdok-pigogo "rdok-pigogo (1 commits)")[![RicardoRamirezR](https://avatars.githubusercontent.com/u/6526545?v=4)](https://github.com/RicardoRamirezR "RicardoRamirezR (1 commits)")[![rspahni](https://avatars.githubusercontent.com/u/6449613?v=4)](https://github.com/rspahni "rspahni (1 commits)")[![taliptako](https://avatars.githubusercontent.com/u/2073785?v=4)](https://github.com/taliptako "taliptako (1 commits)")

---

Tags

image-optimizationlaravellaravelimageoptimize

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/approached-laravel-image-optimizer/health.svg)

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

PHPackages © 2026

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