twoh / twoh_tiny_png
Optimize your TYPO3 Images using the TinyPNG API
Installs: 22
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
pkg:composer/twoh/twoh_tiny_png
Requires
- php: >=8.2 <8.4
- ext-gd: *
- ext-pdo: *
- tinify/tinify: ^1.6.3
- typo3/cms-core: ^13.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.91
- phpunit/phpunit: ^11.5
- roave/security-advisories: dev-latest
- typo3/testing-framework: ^8.0
README
Optimize your TYPO3 images automatically using the TinyPNG API
📋 Requirements
| Requirement | Version |
|---|---|
| PHP | >= 8.2 |
| Composer | >= 2.4 |
| TYPO3 | 13.x |
🔑 Get Your TinyPNG API Key
- Visit TinyPNG Developers
- Enter your Full Name
- Enter your E-Mail
- Receive your API Key
🚀 Installation & Setup
Extension Setup
-
Install the extension via Composer:
composer require twoh/twoh_tiny_png
-
Include the extension in your TypoScript ROOT Template
-
Configure the following TypoScript settings:
- Set your API Key
- Create a Backend folder for TinyPNG records
- Set the PID of your backend folder
- (Optional) Set Width for image resizing on upload (height is calculated automatically)
Scheduler Setup (Bulk Optimization)
- Create a new Scheduler Task
- Select TinyPNG Bulk Compression Command
- Start the cron job
⚠️ Note: The cron may take longer depending on the number of images.
⚙️ Configuration
Ignore Specific Folders
To exclude images from specific folders, add them to your TypoScript Constants (comma-separated):
ignoreImagesByFolderName = {$plugin.tx_twohtinypng.settings.ignoreImagesByFolderName}
File Upload Process
The extension hooks into the File Upload Process and automatically compresses images on upload.
🛠️ Development
Code Quality with PHP CS Fixer
This extension uses PHP CS Fixer for code style enforcement following TYPO3 best practices.
| Command | Description |
|---|---|
composer cs:fix |
Auto-fix code style issues |
composer cs:check |
Check for violations (dry-run) |
👥 Authors
| Name | Role | Contact |
|---|---|---|
| Andreas Reichel | Developer | a.reichel91@outlook.com |
| Igor Smertin | Developer | igor.smertin@web.de |
📚 Documentation
For detailed documentation, visit: TYPO3 Documentation
🐛 Issues & Support
Found a bug or have a feature request? Please open an issue on GitHub.
📄 License
This project is licensed under the GPL-2.0-or-later license.