PHPackages                             sourcebroker/imageopt - 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. sourcebroker/imageopt

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

sourcebroker/imageopt
=====================

Optimize images created/resized by TYPO3 so they take less space. Safe as it does not optimize original images.

7.0.2(2y ago)3144.7k↓16.7%9[2 issues](https://github.com/sourcebroker/imageopt/issues)GPL-2.0-or-laterPHP

Since Jan 25Pushed 1y ago3 watchersCompare

[ Source](https://github.com/sourcebroker/imageopt)[ Packagist](https://packagist.org/packages/sourcebroker/imageopt)[ RSS](/packages/sourcebroker-imageopt/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (30)Used By (0)

TYPO3 Extension imageopt
========================

[](#typo3-extension-imageopt)

> [![https://travis-ci.org/sourcebroker/imageopt.svg?branch=master](https://camo.githubusercontent.com/ceec7c4f10459dd8a972464eeefdda4ed1559fd47c4b16905f7c67527b066ae7/68747470733a2f2f7472617669732d63692e6f72672f736f7572636562726f6b65722f696d6167656f70742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sourcebroker/imageopt)[![https://poser.pugx.org/sourcebroker/imageopt/license](https://camo.githubusercontent.com/bf7aec5a6cc64e84f5a9754694d7924b448bc6b64686e4d4ce5e73c5072d1250/68747470733a2f2f706f7365722e707567782e6f72672f736f7572636562726f6b65722f696d6167656f70742f6c6963656e7365)](https://packagist.org/packages/sourcebroker/imageopt)

- [What does it do?](#what-does-it-do)
- [Features](#features)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Configuration for frontend image processing](#configuration-for-frontend-image-processing)
- [Technical notes](#technical-notes)
- [Changelog](#changelog)

[What does it do?](#id1)
------------------------

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

This extension optimize images resized by TYPO3 so they will take less space, page will be downloaded faster and Google PageSpeed Insights score will get higher.

Example CLI output:

[![Documentation/Images/OutputCliExample.png](Documentation/Images/OutputCliExample.png)](Documentation/Images/OutputCliExample.png)

TYPO3 backend - "Executor Result" record example:

[![Documentation/Images/ExecutorResultExample.png](Documentation/Images/ExecutorResultExample.png)](Documentation/Images/ExecutorResultExample.png)

[Features](#id2)
----------------

[](#features)

- Its safe as the original images, for example in folder `fileadmin/`, `uploads/` are not optmized! Only already resized images are optmized, so for FAL that would be files form `_processed_/` folders and for `uploads/` it will be files from `typo3temp/assets/images`. Imageopt can force images to be processed so in other words you will not find any image in HTML that links directly to original images in `/fileadmin/`or `/uploads/`.
- Support for following local binaries providers:
    - for png - pngquant, optipng, pngcrush,
    - for gif - gifsicle,
    - for jpeg - mozjpeg, jpegoptim, jpegtran.
- Support for following remote providers:
    - kraken.io,
    - imageoptim.com,
    - tinypng.com.
- Own providers can be registered with page TSconfig.
- Can create file variants with diffent name. For example optimize as webp and save under {filename}.{extension}.webp

[Installation](#id3)
--------------------

[](#installation)

1. Install using composer:

    ```
    composer require sourcebroker/imageopt
    ```

[Configuration](#id4)
---------------------

[](#configuration)

1. Open main Template record and add "imageopt" in tab "Includes" -&gt; field "Include static (from extensions)"
2. Open homepage properties and choose one of predefined modes (or create own)
3. If you choosed Kraken in predefined mode then you need to enter the key / pass pair in PageTS.

    ```
    tx_imageopt {
      providers {
        kraken {
          executors.10.api.auth.key = 2dae79a5813bb19eda29cc0cb4c9d39c
          executors.10.api.auth.pass = 87e06b68c69f71afbf5c1730b49f48e5c26db24a
        }
      }
    }
    ```

[Usage](#id5)
-------------

[](#usage)

1. Make a direct cli command run to optimize all existing images at once for first time.

    1. For FAL processed images:

        ```
        php typo3/sysext/core/bin/typo3 imageopt:optimizefalprocessedimages --numberOfImagesToProcess=999
        ```
    2. For folder processed images.

        ```
        php typo3/sysext/core/bin/typo3 imageopt:optimizefolderimages --numberOfImagesToProcess=999
        ```

        Command "imageopt:optimizefolderimages" will optimize images in following folders:

        - typo3temp/pics/
        - typo3temp/GB/
        - typo3temp/assets/images/
2. For all images which will be processed in future set up scheduler job.

[Configuration for frontend image processing](#id6)
---------------------------------------------------

[](#configuration-for-frontend-image-processing)

As already stated imageopt extension offers processing of all images even if the processing is not needed (for example because the size of original image is the same as desired image). Its good and safe because original images in folder `fileadmin/`, `uploads/` are not optmized so in case of wrong optimisation nothing will be destroyed! Only already resized images are optmized, so for FAL that would be files form `_processed_/` folders and for `uploads/` it will be `typo3temp/assets/images`.

To enable this feature you need to open main Template record and add "imageopt" in tab "Includes" -&gt; "Include static (from extensions)". If you do not enable this feature then it can be that not all images will be optimized as part of them will be used directly from `fileadmin/` or `uploads/` folders.

The Typoscript added by imageopt is:

```
plugin.tx_imageopt {
   imageProcessing {
      // Force processing of all images on frontend because imageopt should not optimize original images.
      force = 1
      exclusion {
        // Regexp on filepath and filename. When true this file will not be forced to be processed on frontend.
        // Example /animation.*\.gif/ -> do not force gif files that have animation in name or folder name.
        // Example /\.gif/ -> do not force gif files
        regexp =
      }
   }
}
```

As you see you can use `plugin.tx_imageopt.exclusion.regexp` to exclude files which will be not forced to be processed (so the original version will be used). This is handy for example for gif animations (which are not supported to be processed by TYPO3). You can use `plugin.tx_imageopt.exclusion.regexp` also to not process images that you think are arleady optimized enough.

[Technical notes](#id7)
-----------------------

[](#technical-notes)

- For FAL only files that are in "sys\_file\_processedfile" are optimized. Table "sys\_file\_processedfile" has been extended with field "tx\_imageopt\_executed\_successfully". If file has been optimised then the field "tx\_imageopt\_executed\_successfully" is set to 1.

    You can reset the "tx\_imageopt\_executed\_successfully" flag with command:

    ```
    php typo3/sysext/core/bin/typo3 imageopt:resetoptimizationflagforfal
    ```

    This can be handy for testing purposes.
- If you optimize files from folders then if file has been optimized it gets "executed" persmission bit. So for most cases its 644 on the beginning and 744 after optimization. The "execution" bit is the way script knows which files has been optimized and which one still needs.

    You can reset the "executed" bit for folders declared in "tx\_imageopt.directories" with command:

    ```
    php typo3/sysext/core/bin/typo3 imageopt:resetoptimizationflagforfolders
    ```

    This can be handy for testing purposes.

[Changelog](#id8)
-----------------

[](#changelog)

See

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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 ~94 days

Recently: every ~204 days

Total

27

Last Release

976d ago

Major Versions

2.0.1 → 3.0.02018-10-13

3.0.0 → 4.0.02018-12-27

2.1.0 → 5.0.02019-03-02

5.0.0 → 6.0.02020-09-30

6.0.3 → 7.0.02023-07-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/6066d053dfdc12f5a676444f6a40b5b7d0b5a112e0ab746c8b04f4a7201b0624?d=identicon)[sourcebroker](/maintainers/sourcebroker)

---

Top Contributors

[![kszymukowicz](https://avatars.githubusercontent.com/u/1453553?v=4)](https://github.com/kszymukowicz "kszymukowicz (254 commits)")[![kamilmaliszewski](https://avatars.githubusercontent.com/u/26593996?v=4)](https://github.com/kamilmaliszewski "kamilmaliszewski (12 commits)")[![frans-beech-it](https://avatars.githubusercontent.com/u/4436635?v=4)](https://github.com/frans-beech-it "frans-beech-it (3 commits)")[![FamousWolf](https://avatars.githubusercontent.com/u/6401921?v=4)](https://github.com/FamousWolf "FamousWolf (1 commits)")

---

Tags

google-pagespeed-insightsimage-optimizationimageoptimjpegoptimjpegtrankrakenmozjpegoptipngpagespeed-insightspngcrushpngquanttinypngtypo3-cms-extensiontypo3-extensionwebp

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sourcebroker-imageopt/health.svg)

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

###  Alternatives

[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[plan2net/webp

Drop-in WebP, AVIF, and JPEG XL delivery for TYPO3 images — automatic, no URL or template changes

681.5M5](/packages/plan2net-webp)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[christophlehmann/imageoptimizer

Optimize uploaded/processed images with binaries of your choice

47523.7k](/packages/christophlehmann-imageoptimizer)[schmitzal/tinyimg

Image compression for all pngs and jpgs uploaded to the backend (using the tinypng API)

16131.1k](/packages/schmitzal-tinyimg)[blueways/bw-focuspoint-images

Image Editor for adding focus points to images

12112.7k2](/packages/blueways-bw-focuspoint-images)

PHPackages © 2026

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