Search by

move-elevator / typo3-image-compression

move-elevator

Automatically compress images using TinyPNG API, local tools (jpegoptim, optipng, etc.), or ImageMagick/GraphicsMagick

Package info

github.com/move-elevator/typo3-image-compression

Type:typo3-cms-extension

pkg:composer/move-elevator/typo3-image-compression

Statistics

Installs: 4 766

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 1

1.2.0 2026-09-28 08:10 UTC

README

Extension icon

TYPO3 extension typo3_image_compression

Latest Stable Version TYPO3 Coverage CGL Tests Packagist License

This TYPO3 extension automatically compresses images uploaded to the TYPO3 backend. Choose between the TinyPNG API for best results or local tools for cost-free compression.

Note

Uncompressed images are one of the most common causes of slow-loading TYPO3 websites. This extension compresses images automatically as part of the file processing pipeline, so editors don't have to remember to optimize every upload manually.

✨ Features

  • Multiple compression providers: TinyPNG API, local optimized tools, or ImageMagick/GraphicsMagick
  • Automatic compression of JPG, PNG, WebP and AVIF images on upload, plus SVG when svgo is installed — GIF support exists but is off by default
  • CLI command for batch processing existing images
  • Quality settings for local compression
  • Backup & restore: keep a copy of the original before compressing and restore it later, from the file list or the CLI
  • Backend integration: compression statistics in the system information toolbar, per-file status in the file metadata edit view, and a System Report with per-provider statistics

🔥 Installation

Requirements

  • TYPO3 >= 12.4
  • PHP >= 8.2
  • A FAL storage using the built-in Local driver. Storages on a non-local driver (S3, Azure, ...) are detected and skipped automatically, since compression needs to read and write the file on local disk.

Composer

Packagist Downloads

composer require move-elevator/typo3-image-compression

TER

TER version TER downloads

Download the zip file from the TYPO3 Extension Repository (TER).

🚀 Quick start

composer require move-elevator/typo3-image-compression

Set Provider to tinify and paste your TinyPNG API key in Admin Tools > Settings > Extension Configuration. That's it: the next image uploaded to the TYPO3 backend is compressed automatically.

⚙️ Configuration

Configure the extension in Admin Tools > Settings > Extension Configuration.

Provider Tools Compression Cost Best for
tinify TinyPNG API ~70–80% API quota Production, best quality
local-tools jpegoptim, optipng, pngquant, gifsicle, cwebp, avifenc, svgo (optional) ~50–60% Free Self-hosted, no API costs
local-basic ImageMagick / GraphicsMagick ~30–40% Free JPEG only, quick setup

Provider also accepts a comma-separated, ordered list for fallback: tinify,local-tools uses tinify first, falling back to local-tools for a MIME type tinify cannot handle or once the TinyPNG quota is exhausted. A single value, the default, behaves exactly as before.

Warning

The tinify free tier is limited to 500 compressions/month. Use the CLI --include-processed flag with caution on large sites with many existing images.

See the configuration reference for provider setup, every extension configuration option, and quality tuning.

📚 Documentation

Topic What's inside
Configuration Provider setup (tinify, local-tools, local-basic), every extension configuration option, and quality tuning
Usage The imagecompression:compressImages CLI command and its options, backup & restore, plus backend integration (toolbar, reports, file metadata)

🧑‍💻 Contributing

Please refer to CONTRIBUTING.md.

💎 Credits

This project is a fork and further development of the great tinyimg extension.

⭐ License

This project is licensed under the GNU General Public License 2.0 (or later).