ORIENT/plugins/toughdeveloper/imageresizer/vendor/tinify/tinify
root 4d3d78884a server 2021-06-02 11:07:53 +00:00
..
lib server 2021-06-02 11:07:53 +00:00
test server 2021-06-02 11:07:53 +00:00
CHANGES.md server 2021-06-02 11:07:53 +00:00
LICENSE server 2021-06-02 11:07:53 +00:00
README.md server 2021-06-02 11:07:53 +00:00
composer.json server 2021-06-02 11:07:53 +00:00
phpunit.xml server 2021-06-02 11:07:53 +00:00
update-cacert.sh server 2021-06-02 11:07:53 +00:00

README.md

Build Status

Tinify API client for PHP

PHP client for the Tinify API, used for TinyPNG and TinyJPG. Tinify compresses your images intelligently. Read more at http://tinify.com.

Documentation

Go to the documentation for the PHP client.

Installation

Install the API client with Composer. Add this to your composer.json:

{
  "require": {
    "tinify/tinify": "*"
  }
}

Then install with:

composer install

Use autoloading to make the client available in PHP:

require_once("vendor/autoload.php");

Usage

Tinify\setKey("YOUR_API_KEY");
Tinify\fromFile("unoptimized.png")->toFile("optimized.png");

Running tests

composer install
vendor/bin/phpunit

Integration tests

composer install
TINIFY_KEY=$YOUR_API_KEY vendor/bin/phpunit --no-configuration test/integration.php

License

This software is licensed under the MIT License. View the license.