PHPackages                             globalis/wp-cubi-imagemin - 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. globalis/wp-cubi-imagemin

ActiveWordpress-plugin[Image &amp; Media](/categories/media)

globalis/wp-cubi-imagemin
=========================

Standalone image minification WordPress plugin

1.3.3(1y ago)1318.2k↓69%3[1 PRs](https://github.com/globalis-ms/wp-cubi-imagemin/pulls)1GPL-2.0-or-laterPHPPHP &gt;=8.0

Since Jan 18Pushed 1y ago6 watchersCompare

[ Source](https://github.com/globalis-ms/wp-cubi-imagemin)[ Packagist](https://packagist.org/packages/globalis/wp-cubi-imagemin)[ Docs](https://github.com/globalis-ms/wp-cubi-imagemin)[ RSS](/packages/globalis-wp-cubi-imagemin/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (17)Used By (1)

[wp-cubi-imagemin](https://github.com/globalis-ms/wp-cubi-imagemin)
===================================================================

[](#wp-cubi-imagemin)

[![Build Status](https://camo.githubusercontent.com/3a1fb1ed873ae536cf35683157f1db54e3cf650d7a1a03f9f9e1dd4313461bfb/68747470733a2f2f7472617669732d63692e6f72672f676c6f62616c69732d6d732f77702d637562692d696d6167656d696e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/globalis-ms/wp-cubi-imagemin)[![Latest Stable Version](https://camo.githubusercontent.com/a876a96163943de1c277e619df1216ed7f714f57da40e7d8361bf166351e07a5/68747470733a2f2f706f7365722e707567782e6f72672f676c6f62616c69732f77702d637562692d696d6167656d696e2f762f737461626c65)](https://packagist.org/packages/globalis/wp-cubi-imagemin)[![License](https://camo.githubusercontent.com/c84ec0609a46074710164beede38773b632164a9051475af0a17fa08f0746040/68747470733a2f2f706f7365722e707567782e6f72672f676c6f62616c69732f77702d637562692d696d6167656d696e2f6c6963656e7365)](https://github.com/globalis-ms/wp-cubi-imagemin/blob/master/LICENSE.md)

Standalone image minification WordPress plugin

[![wp-cubi](https://github.com/globalis-ms/wp-cubi/raw/master/.resources/wp-cubi-500x175.jpg)](https://github.com/globalis-ms/wp-cubi/)

Overview
--------

[](#overview)

**wp-cubi-imagemin** is a very simple image minification plugin for WordPress, meant to be used in a composer installation. It uses a couple of image minification tools to optimize uploaded images (**jpg**, **png**, **gif** and **svg**).

**wp-cubi-imagemin** is essentially a WordPress wrapper for [psliwa/image-optimizer](https://github.com/psliwa/image-optimizer).

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

[](#installation)

- `composer require globalis/wp-cubi-imagemin`

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

[](#configuration)

The plugin will try to find the image minification tools it needs on the system. But you can provide your own binaries instead, and the plugin will use them.

To use your own binaries, just define the following constants in your configuration files, pointing to your binaries paths :

```
define('WP_CUBI_IMAGEMIN_PATH_BIN_ADVPNG', '/var/www/your-project/bin/advpng');
define('WP_CUBI_IMAGEMIN_PATH_BIN_GIFSICLE', '/var/www/your-project/bin/gifsicle');
define('WP_CUBI_IMAGEMIN_PATH_BIN_JPEGOPTIM', '/var/www/your-project/bin/jpegoptim');
define('WP_CUBI_IMAGEMIN_PATH_BIN_JPEGTRAN', '/var/www/your-project/bin/jpegtran');
define('WP_CUBI_IMAGEMIN_PATH_BIN_OPTIPNG', '/var/www/your-project/bin/optipng');
define('WP_CUBI_IMAGEMIN_PATH_BIN_PNGCRUSH', '/var/www/your-project/bin/pngcrush');
define('WP_CUBI_IMAGEMIN_PATH_BIN_PNGOUT', '/var/www/your-project/bin/pngout');
define('WP_CUBI_IMAGEMIN_PATH_BIN_PNGQUANT', '/var/www/your-project/bin/pngquant');
define('WP_CUBI_IMAGEMIN_PATH_BIN_SVGO', '/var/www/your-project/bin/svgo');
```

If you do not define one ot the binaries paths, the plugin will try to use the system version. If it doesn't find an installed version on the system, it will just skip this tool and use the other ones.

You don't need to have all the tools working, but it is recommanded to have at least **pngquant**, **jpegoptim** and **gifsicle** to provide a meaningfull level of minification.

**Note:** binary files must have execution permissions.

Hooks
-----

[](#hooks)

- `apply_filters('wp-cubi-imagemin\options', $options)` : Filter the options of `ImageOptimizer\OptimizerFactory` (see the [complete list](https://github.com/psliwa/image-optimizer#configuration)), such as the JPG compression level (default to 85 in wp-cubi-imagemin).

Bulk optimization
-----------------

[](#bulk-optimization)

Bulk image optimization can be done using [wp-cli](http://wp-cli.org/) :

- Install **wp-cli** and ensure **wp-cubi-imagemin** is activated
- Usage: `wp media optimize ... [--jpeg_level=]`
- Help: `wp help media optimize`

**Note:** thumbnails regeneration commands such as [`wp media regenerate`](https://developer.wordpress.org/cli/commands/media/regenerate/) will trigger plugin optimization functions as well.

Binaries
--------

[](#binaries)

Available binaries :

- [advpng](https://github.com/imagemin/advpng-bin/tree/master/vendor)
- [gifsicle](https://github.com/imagemin/gifsicle-bin/tree/master/vendor)
- [jpegoptim](https://github.com/imagemin/jpegoptim-bin/tree/master/vendor)
- [jpegtran](https://github.com/imagemin/jpegtran-bin/tree/master/vendor)
- [optipng](https://github.com/imagemin/optipng-bin/tree/master/vendor)
- [pngcrush](https://github.com/imagemin/pngcrush-bin/tree/master/vendor)
- [pngout](https://github.com/imagemin/pngout-bin/tree/master/vendor)
- [pngquant](https://github.com/imagemin/pngquant-bin/tree/master/vendor)
- [svgo](https://github.com/svg/svgo/tree/master/bin)

Development
-----------

[](#development)

Before opening pull requests, please check and apply project coding standards with `./vendor/bin/phpcs .` and/or `./vendor/bin/phpcbf .`

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 93.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 ~191 days

Recently: every ~462 days

Total

14

Last Release

604d ago

Major Versions

0.2.0 → 1.0.02018-03-07

PHP version history (4 changes)0.1.0PHP &gt;=5.5.0

1.2.0PHP &gt;=7.1

1.3.0PHP &gt;=7.4

1.3.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd8698f16f37576ccaab853278c3a85e7149237662d7062fea863574a5b8988c?d=identicon)[globalis](/maintainers/globalis)

---

Top Contributors

[![pierre-dargham](https://avatars.githubusercontent.com/u/6932545?v=4)](https://github.com/pierre-dargham "pierre-dargham (14 commits)")[![SuleymanKaplan11](https://avatars.githubusercontent.com/u/153504691?v=4)](https://github.com/SuleymanKaplan11 "SuleymanKaplan11 (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/globalis-wp-cubi-imagemin/health.svg)

```
[![Health](https://phpackages.com/badges/globalis-wp-cubi-imagemin/health.svg)](https://phpackages.com/packages/globalis-wp-cubi-imagemin)
```

###  Alternatives

[spatie/image

Manipulate images with an expressive API

1.4k60.7M188](/packages/spatie-image)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[mindkomm/timmy

Advanced image manipulation for Timber.

17737.8k](/packages/mindkomm-timmy)[wp-media/imagify-plugin

Image optimization plugin for WordPress by WP Media.

8067.5k](/packages/wp-media-imagify-plugin)

PHPackages © 2026

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