PHPackages                             moc/imageoptimizer - 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. moc/imageoptimizer

ActiveNeos-package[Image &amp; Media](/categories/media)

moc/imageoptimizer
==================

Flow package that optimizes generated thumbnail images (jpg, png, gif, svg) for web presentation.

4.0.0(6y ago)31106.8k↓34.9%14[2 PRs](https://github.com/mocdk/MOC.ImageOptimizer/pulls)MITPHP

Since Apr 15Pushed 2y ago6 watchersCompare

[ Source](https://github.com/mocdk/MOC.ImageOptimizer)[ Packagist](https://packagist.org/packages/moc/imageoptimizer)[ RSS](/packages/moc-imageoptimizer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

MOC.ImageOptimizer
==================

[](#mocimageoptimizer)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8597ceb429f9e767ad0b38209b3b20efe5de1bc6877ea74189b21e95ebc09596/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d6f63646b2f4d4f432e496d6167654f7074696d697a65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mocdk/MOC.ImageOptimizer/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/3b588e9c4c4e62d1d1a7d799bdc020d52b939740645e1b17fb8f4147f4a3dd61/68747470733a2f2f706f7365722e707567782e6f72672f6d6f632f696d6167656f7074696d697a65722f762f737461626c65)](https://packagist.org/packages/moc/imageoptimizer)[![Total Downloads](https://camo.githubusercontent.com/b0b03d357585e399df9ebcddf0a40633c817b8f1d90faad7c8ecd57dc2618406/68747470733a2f2f706f7365722e707567782e6f72672f6d6f632f696d6167656f7074696d697a65722f646f776e6c6f616473)](https://packagist.org/packages/moc/imageoptimizer)[![License](https://camo.githubusercontent.com/faf1965680a35f5f0b99293f210c311adb660d5fba90a7b23a5e69e2d79c34ab/68747470733a2f2f706f7365722e707567782e6f72672f6d6f632f696d6167656f7074696d697a65722f6c6963656e7365)](https://packagist.org/packages/moc/imageoptimizer)

Introduction
------------

[](#introduction)

Neos CMS / Flow framework package that optimizes generated thumbnail images (jpg, png, gif, svg and more) for web presentation.

Original files are never affected since copies are always created for thumbnails.

Non-blocking during rendering (asynchronous) optimization.

Using jpegtran, optipng, gifsicle and svgo or alternative customizible ones for the optimizations.

Should work with Linux, FreeBSD, OSX, SunOS &amp; Windows (only tested Linux &amp; FreeBSD so far).

Compatible with Neos 1.x - 5.x / Flow 1.x - 6.x

##### Only supports local file system (no CDN support yet) (see #10)

[](#only-supports-local-file-system-no-cdn-support-yet-see-10)

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

[](#installation)

Requires npm (node.js) to work out of the box, although binaries can also be installed manually without it.

`composer require "moc/imageoptimizer" "~4.0"`

Ensure the image manipulation libraries `jpegtran` (JPG), `optipng` (PNG), `gifsicle` (GIF) and `svgo` (SVG) are installed globally. Libraries can be skipped if desired, just make sure to disable those mimetypes.

Alternatively install them using `npm`:

```
# Globally
npm install -g jpegtran-bin optipng-bin gifsicle svgo

# Locally
npm install --prefix Packages/Application/MOC.ImageOptimizer/Resources/Private/Library

```

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

[](#configuration)

Using the `Settings` configuration, multiple options can be adjusted.

Optimization can be disabled for specific file formats.

Additionally options such as optimization level (png &amp; gif), progressive (jpg), pretty (svg) can be adjusted depending on optimization library.

Usage of global available binaries can be configured instead or for specific formats.

Enable using the setting `MOC.ImageOptimizer.useGlobalBinary` and configure the path in `MOC.ImageOptimizer.globalBinaryPath`.

Use alternative libraries for optimization
------------------------------------------

[](#use-alternative-libraries-for-optimization)

You can replace the preconfigured libraries with alternative ones.

Example:

Add the following to your `Settings` to use `jpegoptim` instead of `jpegtran`:

```
MOC:
  ImageOptimizer:
    formats:
      'image/jpeg':
        enabled: true
        library: 'jpegoptim'
        binaryPath: 'jpegoptim-bin/vendor/jpegoptim'
        arguments: "${'--strip-all --max=' + quality + ' ' + (progressive ? '--all-progressive ' : '') + '-o ' + file}"
        parameters:
          progressive: true # whether or not to serve progressive jpgs
          quality: 80 # quality level (1-100)

```

When doing this you have to take care that you provide the necessary library yourself as it's not included when doing the installation like described above.

Usage
-----

[](#usage)

- Clear thumbnails to generate new ones that will automatically be optimized.

`./flow media:clearthumbnails`

- See system log for debugging and error output.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 82.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 ~226 days

Recently: every ~342 days

Total

8

Last Release

2463d ago

Major Versions

1.0.1 → 2.0.02015-10-18

2.0.2 → 3.0.02017-01-20

3.0.1 → 4.0.02019-08-20

### Community

Maintainers

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

---

Top Contributors

[![aertmann](https://avatars.githubusercontent.com/u/903567?v=4)](https://github.com/aertmann "aertmann (33 commits)")[![daniellienert](https://avatars.githubusercontent.com/u/642226?v=4)](https://github.com/daniellienert "daniellienert (2 commits)")[![dfeyer](https://avatars.githubusercontent.com/u/221173?v=4)](https://github.com/dfeyer "dfeyer (2 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (1 commits)")[![mrimann](https://avatars.githubusercontent.com/u/1093784?v=4)](https://github.com/mrimann "mrimann (1 commits)")[![Sebobo](https://avatars.githubusercontent.com/u/596967?v=4)](https://github.com/Sebobo "Sebobo (1 commits)")

---

Tags

flowframeworkneoscmsperformanceimagesmediaflowNeosimageoptimization

### Embed Badge

![Health badge](/badges/moc-imageoptimizer/health.svg)

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

###  Alternatives

[wp-media/imagify-plugin

Image optimization plugin for WordPress by WP Media.

7960.9k](/packages/wp-media-imagify-plugin)[silvanite/nova-field-cloudinary

A Laravel Nova Image Field with Flysystem Adapter for storing and retrieving media from Cloudinary

2772.0k3](/packages/silvanite-nova-field-cloudinary)[christophlehmann/imgproxy

TYPO3 Extension for serving images with imgproxy.

1543.1k](/packages/christophlehmann-imgproxy)[jonnitto/plyr

Plyr.io for Neos.io

1236.2k2](/packages/jonnitto-plyr)

PHPackages © 2026

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