Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loevgaard/tinypng-bundle
A Symfony bundle for the TinyPNG/TinyJPG API
https://github.com/loevgaard/tinypng-bundle
bundle php symfony symfony-bundle tinypng tinypng-api
Last synced: 3 months ago
JSON representation
A Symfony bundle for the TinyPNG/TinyJPG API
- Host: GitHub
- URL: https://github.com/loevgaard/tinypng-bundle
- Owner: loevgaard
- License: mit
- Created: 2016-09-06T08:22:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-04T11:48:09.000Z (over 6 years ago)
- Last Synced: 2024-10-11T03:21:57.937Z (4 months ago)
- Topics: bundle, php, symfony, symfony-bundle, tinypng, tinypng-api
- Language: PHP
- Size: 7.81 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TinyPNG bundle for Symfony
**This bundle is abandoned. Use this [TinyPNG bundle](https://github.com/Setono/TinyPngBundle) 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`:
```php
$bundles = [
...
new Tinypng\Bundle\TinypngBundle(),
...
];
```Now you can do
```php
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](https://github.com/tinify/tinify-php).