PHPackages                             sitegeist/image-jack - 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. sitegeist/image-jack

ActiveTypo3-cms-extension[Image &amp; Media](/categories/media)

sitegeist/image-jack
====================

Jack of all trades concerning image optimization. Also introduces the usage of next-gen-image-formats

0.11.2(3mo ago)969.8k—9%4[2 PRs](https://github.com/sitegeist/image-jack/pulls)GPL-2.0-or-laterPHPPHP &gt;=8.2.0CI passing

Since Nov 4Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/sitegeist/image-jack)[ Packagist](https://packagist.org/packages/sitegeist/image-jack)[ Docs](https://github.com/sitegeist/image-jack)[ RSS](/packages/sitegeist-image-jack/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (14)Used By (0)

Image Jack
==========

[](#image-jack)

Jack of all trades concerning image optimization. Also introduces the usage of next-gen-image-formats.

What does it do?
----------------

[](#what-does-it-do)

Adds the possibility to optimize existing jpg, gif and png files during processing. Furthermore, it can add a webP copy of every processed image.

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

[](#installation)

Use composer to add the extension:

```
composer require "sitegeist/image-jack"

```

- Completely clear all processed images via the maintenance module
- Flush Caches
- Change the server configuration (see below) or activate the fallback driver xclass

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

[](#configuration)

### Webserver

[](#webserver)

To deliver the webP images, the webserver needs to be configured properly. Example for Apache (.htaccess):

```
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{REQUEST_FILENAME} (.*)\.(png|gif|jpe?g)$
RewriteCond %{REQUEST_FILENAME}\.webp -f
RewriteRule ^ %{REQUEST_FILENAME}\.webp [L,T=image/webp]

        Header append Vary Accept

```

As we are creating the webP images as copies (keeping the original image untouched) this configuration delivers the webP image if the client supports it. Otherwise, the original image is served.

#### Storage API (beta)

[](#storage-api-beta)

As a fallback solution (e.g. for remote storages) there is an option in the extension settings to activate a xclass for the storage driver. There needs to be a class for every storage driver that should be extended. The LocalDriver and the AmazonS3Driver are already available. To avoid the cache problem (first client defines the served image format) the image formats from the clients accept header are added to the page cache identifier. If this option is activated the htaccess modification (see [Webserver](#webserver)) is no longer necessary.

### Scheduler / Cronjob

[](#scheduler--cronjob)

To start the image processing a command is available:

```
jack:process --limit=20

```

The images are processed one by one. By changing the limit, the number of images to process in one run can be defined.

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

[](#requirements)

### webp

[](#webp)

For the webp conversion an installed version of Imagemagick or GraphicsMagick with webp support is required.

You can check this with:

```
gm -version | grep -i webp

```

or:

```
convert -version | grep -i webp

```

When using gd, webP support is needed.

### jpg optimization

[](#jpg-optimization)

For optimizing jpg files the binary "jpegoptim" is required. You can check this with:

```
which jpegoptim

```

(Should return a path)

If missing it can be installed for example with this command:

```
apt install jpegoptim

```

### png/gif optimization

[](#pnggif-optimization)

For optimizing png and gif files the binary "optipng" is required. You can check this with:

```
which optipng

```

(Should return a path)

If missing it can be installed for example with this command:

```
apt install optipng

```

Extension settings
------------------

[](#extension-settings)

### General

[](#general)

#### useLiveProcessing

[](#useliveprocessing)

If enabled the images are processed live on request using a LocalImageProcessor. This can lead to high load and very long loading times upon first request (depending on the number of images on the page). It is recommended to stick with the default and use the available command for processing.

#### useFallbackDriver (beta)

[](#usefallbackdriver-beta)

When enabled a xclass is used to extend the getPublicUrl function from the LocalDriver and AmazonS3Driver. This can be used if the htaccess solution is not working, e.g. for remote storages. See [Storage API (beta)](#storage-api-beta) for more details.

### WebP

[](#webp-1)

#### active

[](#active)

(De)activate the conversion.

#### converter

[](#converter)

Which way should be used to convert the images: Imagemagick/GraphicsMagick, GD or an external binary

#### options

[](#options)

Depending on the conversion type this field can be used for different purposes:

- IM/GM: Add options that are directly passed to the binary
- GD: Quality for the new images (1 - 100)
- External: The complete path to the binary to be used. You can use %s for source and target image.

### Avif

[](#avif)

#### active

[](#active-1)

(De)activate the conversion.

#### converter

[](#converter-1)

Which way should be used to convert the images: Imagemagick/GraphicsMagick, GD or an external binary

#### options

[](#options-1)

Depending on the conversion type this field can be used for different purposes:

- IM/GM: Add options that are directly passed to the binary
- GD: Quality for the new images (1 - 100)
- External: The complete path to the binary to be used. You can use %s for source and target image.

### Jpeg

[](#jpeg)

#### active

[](#active-2)

(De)activate the optimization.

#### path

[](#path)

The path to the jpegoptim binary. Please use the complete path as `is_executable` won't work correctly otherwise.

### Png

[](#png)

#### active

[](#active-3)

(De)activate the optimization.

#### path

[](#path-1)

The path to the optipng binary. Please use the complete path as `is_executable` won't work correctly otherwise.

### Logging

[](#logging)

Just activate the levels that should be written to the log file.

Custom optimizer/converter templates
------------------------------------

[](#custom-optimizerconverter-templates)

The custom template should extend AbstractTemplate and implement TemplateInterface. Just use one of the existing templates as a starting point.

Custom templates can be registered like this:

```
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['image_jack']['templates']['myCustomTemplate'] = \Vendor\Extension\Templates\CustomTemplate::class;

```

Jack will automatically pick up and run the new template if it is available for the given image type.

Troubleshooting
---------------

[](#troubleshooting)

A log is written to var/log/typo3\_image\_jack\_\*.log

The extension settings offer the possibility to decide how verbose the logging should be.

Special thanks
--------------

[](#special-thanks)

This extension was inspired by the [webp](https://github.com/plan2net/webp) extension from plan2net.

Authors &amp; Sponsors
----------------------

[](#authors--sponsors)

- [Thorsten Schramm](https://github.com/t-schramm)
- [Benjamin Tammling](https://github.com/Atomschinken)
- [All contributors](https://github.com/sitegeist/image-jack/graphs/contributors)

*The development and the public-releases of this package is generously sponsored by our employer .*

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance80

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.2% 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 ~148 days

Recently: every ~214 days

Total

9

Last Release

104d ago

PHP version history (3 changes)0.9.0PHP &gt;=7.4.0

0.11.0PHP &gt;=8.1.0

0.11.2PHP &gt;=8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3417112414b1e0e135fb48a511e90178dbf2275af7dc6178250b7123eff0a026?d=identicon)[Ulrich Mathes](/maintainers/Ulrich%20Mathes)

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

![](https://www.gravatar.com/avatar/326c29c609fdf2ccb829f66f28711ad14d48a9a28b2cb5f4901cbcd9c51ec799?d=identicon)[t-schramm](/maintainers/t-schramm)

---

Top Contributors

[![Atomschinken](https://avatars.githubusercontent.com/u/3041069?v=4)](https://github.com/Atomschinken "Atomschinken (69 commits)")[![ulrichmathes](https://avatars.githubusercontent.com/u/26324456?v=4)](https://github.com/ulrichmathes "ulrichmathes (8 commits)")[![t-schramm](https://avatars.githubusercontent.com/u/61553607?v=4)](https://github.com/t-schramm "t-schramm (7 commits)")[![avogt1701](https://avatars.githubusercontent.com/u/58982287?v=4)](https://github.com/avogt1701 "avogt1701 (1 commits)")[![s2b](https://avatars.githubusercontent.com/u/458524?v=4)](https://github.com/s2b "s2b (1 commits)")

---

Tags

imageoptimizationtypo3typo3-extension

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sitegeist-image-jack/health.svg)

```
[![Health](https://phpackages.com/badges/sitegeist-image-jack/health.svg)](https://phpackages.com/packages/sitegeist-image-jack)
```

###  Alternatives

[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.

9341.7M25](/packages/ps-image-optimizer)[joshembling/image-optimizer

Optimize your Filament images before they reach your database.

111145.4k12](/packages/joshembling-image-optimizer)[christophlehmann/imageoptimizer

Optimize uploaded/processed images with binaries of your choice

46501.8k](/packages/christophlehmann-imageoptimizer)[webcoast/deferred-image-processing

Handles image processing on request instead of during page generation

1336.1k](/packages/webcoast-deferred-image-processing)[schnitzler/fluid-styled-responsive-images

Enables creation of responsive images for fluid styled content elements.

279.7k1](/packages/schnitzler-fluid-styled-responsive-images)[danihidayatx/image-optimizer

Optimize your Filament images before they reach your database. Forked from joshembling/image-optimizer for Filament v4 &amp; v5 support.

254.4k](/packages/danihidayatx-image-optimizer)

PHPackages © 2026

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