PHPackages                             davgothic/smushit - 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. davgothic/smushit

ActiveLibrary

davgothic/smushit
=================

SmushIt is a PHP client for the popular Yahoo! image compression web service Smush.it

v3.0.1(7y ago)342.5k13MITPHPPHP &gt;=5.5.0

Since Mar 19Pushed 7y ago3 watchersCompare

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

READMEChangelogDependencies (2)Versions (5)Used By (0)

SmushIt
=======

[](#smushit)

[![Version](https://camo.githubusercontent.com/300193112bc93c248b38f8ef0faaee92300432b007a0ab40e014c2e8f3e29b29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646176676f746869632f736d75736869742e737667)](https://packagist.org/packages/davgothic/smushit)[![Build Status](https://camo.githubusercontent.com/6e6d81469bef2bd06cdef2fe308c1ebdd9ab8a9184187dc086e4df735bbb901d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f646176676f746869632f736d75736869742e737667)](https://travis-ci.org/davgothic/smushit)[![Downloads](https://camo.githubusercontent.com/21f5a267f3cd27df9d5ad221b58c6237aef137d01ebf07f81b5bf04b961dd0a3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646176676f746869632f736d75736869742e737667)](https://packagist.org/packages/davgothic/smushit)[![License](https://camo.githubusercontent.com/79747a1ad0141d52cf5f9210d6140ea32c5d4d8ee7e0682f94a319c6af92a65c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646176676f746869632f736d75736869742e737667)](https://github.com/davgothic/smushit/blob/master/LICENSE.md)

SmushIt is a PHP client for the popular Yahoo! image compression web service [Smush.it](http://www.smushit.com/ysmush.it/)

Basic Usage
-----------

[](#basic-usage)

```
use DavGothic\SmushIt\Client;
use DavGothic\SmushIt\SmushIt;

include __DIR__ . '/vendor/autoload.php';

$client = new Client\Curl();
$smushit = new SmushIt($client);

// Compress a local/remote image and return the result object.
$result = $smushit->compress('some/path/to/an/image.png');
print_r($result);

// stdClass Object
// (
//     [src] => http://static0.resmush.it/output/1262dc777d8b239cfdf5f528a4032f02/source.png
//     [dest] => http://static1.resmush.it/output/a9ba82e7ba18e9482e085fadb126edad/output.png
//     [src_size] => 455200
//     [dest_size] => 158075
//     [percent] => 65
//     [format] => png
//     [expires] => Sun, 19 Mar 2017 18:00:33 +0100
//     [generator] => reSmush.it rev.1.4.22.20170224
// )
```

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

[](#installation)

To install the most recent version via [composer](https://getcomposer.org/), run the following command:

```
composer require davgothic/smushit
```

Requirements
------------

[](#requirements)

- PHP 5.5.0+
- PHP JSON extension
- PHP cURL extension (This requirement can be ignored if using any client other than the provided cURL client)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 90% 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 ~168 days

Total

4

Last Release

2834d ago

Major Versions

v2.0.1 → v3.0.02018-02-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/63b52135ba11ca111c48dc1485cc55bd41aadf1e9ec6e33fd0bc90dfae2aabed?d=identicon)[davgothic](/maintainers/davgothic)

---

Top Contributors

[![davgothic](https://avatars.githubusercontent.com/u/158586?v=4)](https://github.com/davgothic "davgothic (27 commits)")[![charlyie](https://avatars.githubusercontent.com/u/1721628?v=4)](https://github.com/charlyie "charlyie (2 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")

---

Tags

image-optimizationphpsmushitimage-optimizationsmushit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/davgothic-smushit/health.svg)

```
[![Health](https://phpackages.com/badges/davgothic-smushit/health.svg)](https://phpackages.com/packages/davgothic-smushit)
```

PHPackages © 2026

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