move-elevator / typo3-image-compression
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
Requires
- php: ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0
- ext-fileinfo: *
- doctrine/dbal: ^3.8 || ^4.0
- psr/container: ^1.1 || ^2.0
- psr/event-dispatcher: ^1.0
- psr/http-message: ^1.0 || ^2.0
- psr/log: ^2.0 || ^3.0
- symfony/console: ^6.4 || ^7.0 || ^8.0
- symfony/messenger: ^6.4 || ^7.0 || ^8.0
- symfony/process: ^6.4 || ^7.0 || ^8.0
- tinify/tinify: ^1.6
- typo3/cms-backend: ^12.4 || ^13.4 || ^14.3
- typo3/cms-core: ^12.4 || ^13.4 || ^14.3
- typo3/cms-extbase: ^12.4 || ^13.4 || ^14.3
- typo3/cms-filelist: ^12.4 || ^13.4 || ^14.3
- typo3/cms-fluid: ^12.4 || ^13.4 || ^14.3
- typo3/cms-frontend: ^12.4 || ^13.4 || ^14.3
- typo3/cms-install: ^12.4 || ^13.4 || ^14.3
- typo3/cms-reports: ^12.4 || ^13.4 || ^14.3
Requires (Dev)
- composer/class-map-generator: ^1.7 || ^2.0
- eliashaeussler/version-bumper: ^2.4 || ^3.0 || ^4.0
- konradmichalik/ttt: ^0.4.0
- phpunit/phpcov: ^9.0 || ^10.0 || ^11.0 || ^12.0
- phpunit/phpunit: ^10.5 || ^11.0 || ^12.0 || ^13.0
- typo3/cms-lowlevel: ^12.4 || ^13.4 || ^14.3
- typo3/testing-framework: ^8.3 || ^9.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 1.2.0
- 1.1.0
- 1.0.2
- 1.0.1
- 1.0.0
- dev-chore/bump-reusable-workflows-0.1.0
- dev-chore/pin-reusable-workflows-0.0.1
- dev-chore/update-phpstan-typo3-preset
- dev-chore/update-ddev-typo3-addon-0.4.0
- dev-fix/require-typo3-rector-315
- dev-feature/ttt-integration
- dev-docs/readme-improvements
- dev-feature/test-coverage-and-phpcov
- dev-fix/command-limit-and-exit-code
- dev-fix/local-tool-exit-codes
- dev-perf/sys-file-indexes
- dev-perf/reduce-page-cache-flush
- dev-fix/tinify-processed-error-state
- dev-chore/gitleaks-ignore-historical-cert
- dev-fix/tinify-init-robustness
- dev-perf/cache-tinify-quota
- dev-security/processed-file-path-traversal
- dev-chore/ci-security-hardening
- dev-chore/static-typo3-support-badges
- dev-security/remove-committed-ddev-certs
- dev-chore/disable-composer-advisory-blocking
- dev-docs/update-security-policy
- dev-maintenance
- dev-chore/icon-and-docs-refresh
- dev-change-github-username
- dev-tests-v14
- dev-report-template-fix
This package is not auto-updated.
Last update: 2026-10-02 08:36:43 UTC
README
TYPO3 extension typo3_image_compression
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
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
composer require move-elevator/typo3-image-compression
TER
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).