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.
- 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
- TYPO3 >= 12.4
- PHP >= 8.2
- A FAL storage using the built-in
Localdriver. 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 require move-elevator/typo3-image-compressionDownload the zip file from the TYPO3 Extension Repository (TER).
composer require move-elevator/typo3-image-compressionSet 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.
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.
| 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) |
Please refer to CONTRIBUTING.md.
This project is a fork and further development of the great tinyimg extension.
This project is licensed under the GNU General Public License 2.0 (or later).