PHPackages                             lciolecki/php-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. lciolecki/php-image-optimizer

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

lciolecki/php-image-optimizer
=============================

PHP image file optimizer (uses https://github.com/bensquire/php-image-optim)

v0.0.1(11y ago)347.4k10[1 issues](https://github.com/lciolecki/php-image-optimizer/issues)BSD-3-ClausePHPPHP &gt;=5.4

Since Dec 16Pushed 10y ago5 watchersCompare

[ Source](https://github.com/lciolecki/php-image-optimizer)[ Packagist](https://packagist.org/packages/lciolecki/php-image-optimizer)[ RSS](/packages/lciolecki-php-image-optimizer/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

PHP Image optimizer
===================

[](#php-image-optimizer)

This is a simple PHP class for optimize image file uses  (png, jpeg, gif). Requires: optipng, jpegoptim, gifsicle

-
-
-

\##Installation using Composer

```
{
    "minimum-stability": "dev",
    "require": {
        "lciolecki/php-image-optimizer": "dev-master"
    }
}

```

Sample use
----------

[](#sample-use)

```
$optimizer = new \Extlib\ImageOptimizer(array(
    \Extlib\ImageOptimizer::OPTIMIZER_OPTIPNG => '/usr/bin/optipng',  //your_path
    \Extlib\ImageOptimizer::OPTIMIZER_JPEGOPTIM => '/usr/bin/jpegoptim', //your_path
    \Extlib\ImageOptimizer::OPTIMIZER_GIFSICLE => '/usr/bin/gifsicle' //your_path
));

$optimizer->optimize("image.png"); //return true
$optimizer->optimize("image.jpg"); //return true
$optimizer->optimize("image.gif"); //return true
$optimizer->optimize("file.txt"); //return false

```

If you don't have some one of packages: optipng, jpegoptim, gifsicle optimizer throws Exception. For save uses take all code in try/catch block.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity48

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4208d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/907665?v=4)[Łukasz Ciołecki](/maintainers/lciolecki)[@lciolecki](https://github.com/lciolecki)

---

Top Contributors

[![lciolecki](https://avatars.githubusercontent.com/u/907665?v=4)](https://github.com/lciolecki "lciolecki (25 commits)")

---

Tags

phpimageoptimizer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lciolecki-php-image-optimizer/health.svg)

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

###  Alternatives

[dantsu/php-image-editor

PHP library to easily edit image with GD extension.

33167.0k2](/packages/dantsu-php-image-editor)[gtuk/image-optimizer

PHP image optimizer for png, jpeg and gif files. It uses mozjpeg, pngquant and gifsicle for the optimization process

161.6k](/packages/gtuk-image-optimizer)

PHPackages © 2026

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