PHPackages                             shinetech/magento2-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. shinetech/magento2-image-optimizer

ActiveMagento2-module[Image &amp; Media](/categories/media)

shinetech/magento2-image-optimizer
==================================

Magento 2 Image optimizer wrapper build on https://github.com/spatie/image-optimize

1.3.0(4y ago)011MITPHPPHP &gt;=7.0

Since Apr 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/shinetechmagento/magento2-image-optimizer)[ Packagist](https://packagist.org/packages/shinetech/magento2-image-optimizer)[ RSS](/packages/shinetech-magento2-image-optimizer/feed)WikiDiscussions master Synced today

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

Magento 2 Image Optimizer
=========================

[](#magento-2-image-optimizer)

This Magento 2 module is a wrapper based on the package [Spatie Image optimizer](https://github.com/spatie/image-optimizer).

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

[](#installation)

- `composer require shinetech/magento2-image-optimizer`
- `bin/magento module:enable JustBetter_ImageOptimizer`
- `bin/magento setup:upgrade && bin/magento setup:static-content:deploy`

### Optimize all images in console

[](#optimize-all-images-in-console)

- Run `bin/magento justbetter:imageoptimizer:optimizeall` to resize all images in the media folder.
- Additional parameters (will overwrite any option in the magento config):
    - `--jpg_compression="85"`
    - `--jpg_strip_all="1"`
    - `--jpg_all_progressive="0"`
    - `--png_quality_min_max="10-15"`
    - `--png_interlace="0"`
    - `--png_optimization_level="8"`

### Optimization tools

[](#optimization-tools)

The package will use these optimizers if they are present on your system:

- [JpegOptim](http://freecode.com/projects/jpegoptim)
- [Optipng](http://optipng.sourceforge.net/)
- [Pngquant 2](https://pngquant.org/)
- [SVGO](https://github.com/svg/svgo)
- [Gifsicle](http://www.lcdf.org/gifsicle/)

Here's how to install all the optimizers on Ubuntu:

```
sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo npm install -g svgo
sudo apt-get install gifsicle
```

And here's how to install the binaries on MacOS (using [Homebrew](https://brew.sh/)):

```
brew install jpegoptim
brew install optipng
brew install pngquant
brew install svgo
brew install gifsicle
```

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

[](#configuration)

- Options for the module are defined in the backend under Stores &gt; Configuration &gt; JustBetter &gt; Image optimizer configuration.
- Possible options:
    - Log the compression in the system.log
    - Change compression of jpg files
    - Change compression of png files

Compatibility
-------------

[](#compatibility)

The module is tested on magento version 2.2.x with Spatie image optimizer version 1.0.x

Ideas, bugs or suggestions?
---------------------------

[](#ideas-bugs-or-suggestions)

Please create a [issue](https://github.com/justbetter/magento2-image-optimizer/issues) or a [pull request](https://github.com/justbetter/magento2-image-optimizer/pulls).

Todo
----

[](#todo)

- Configurable options for compression
- Compress all library images in console command

About us
--------

[](#about-us)

We’re a innovative development agency from The Netherlands building awesome websites, webshops and web applications with Laravel and Magento. Check out our website [justbetter.nl](https://justbetter.nl) and our [open source projects](https://github.com/justbetter).

License
-------

[](#license)

[MIT](LICENSE)

---

[![JustBetter logo](https://raw.githubusercontent.com/justbetter/art/master/justbetter-logo.png)](https://justbetter.nl "JustBetter")

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 81.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 ~514 days

Total

4

Last Release

1465d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a0963f4816d5175c3352c56ce3ea30c4ebfeceb8d8a21b1c3606dc920e6711e?d=identicon)[shinetechmagento](/maintainers/shinetechmagento)

---

Top Contributors

[![rakibabu](https://avatars.githubusercontent.com/u/14089150?v=4)](https://github.com/rakibabu "rakibabu (13 commits)")[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (1 commits)")[![shinetechmagento](https://avatars.githubusercontent.com/u/105262460?v=4)](https://github.com/shinetechmagento "shinetechmagento (1 commits)")[![winds1983](https://avatars.githubusercontent.com/u/1553341?v=4)](https://github.com/winds1983 "winds1983 (1 commits)")

---

Tags

image-optimizermagento 2justbetter

### Embed Badge

![Health badge](/badges/shinetech-magento2-image-optimizer/health.svg)

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

###  Alternatives

[spatie/image

Manipulate images with an expressive API

1.4k60.7M187](/packages/spatie-image)[spatie/image-optimizer

Easily optimize images using PHP

2.9k79.5M154](/packages/spatie-image-optimizer)[ps/image-optimizer

Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

9151.7M25](/packages/ps-image-optimizer)[magepal/magento2-gmailsmtpapp

Magento 2 SMTP Extension - Configure Magento 2 to send all transactional email using Gmail, G Suite, Amazon SES, Office360, Mailgun, SendGrid, Mandrill or any other SMTP servers

3271.9M2](/packages/magepal-magento2-gmailsmtpapp)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[yireo/magento2-next-gen-images

Magento 2 module to add NextGen images support to the Magento frontend

471.2M2](/packages/yireo-magento2-next-gen-images)

PHPackages © 2026

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