loevgaard / tinypng-bundle
Symfony bundle for the TinyPNG/TinyJPG API library
Installs: 6 772
Dependents: 2
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.2
- symfony/config: ^2.1 || ^3.1
- symfony/console: ^2.1 || ^3.1
- symfony/dependency-injection: ^2.1 || ^3.1
- symfony/http-kernel: ^2.1 || ^3.1
- tinify/tinify: ^1.2
README
This bundle is abandoned. Use this TinyPNG bundle instead
The TinyPNG bundle adds a very simple configuration option in config.yml
to configure the TinyPNG API.
Usage
Add bundle using composer:
composer require loevgaard/tinypng-bundle
Add configuration to config.yml
:
tinypng:
api_key: [INSERT API KEY]
Add bundle to AppKernel.php
:
$bundles = [ ... new Tinypng\Bundle\TinypngBundle(), ... ];
Now you can do
Tinify\fromFile("unoptimized.png")->toFile("optimized.png");
directly without setting the API key.
For usage of the TinyPNG API see https://github.com/tinify/tinify-php.