robopuff / tinypng

TinyPNG API implementation in PHP

Home Page:https://robopuff.github.io/tinypng/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

TinyPNG API client for PHP

PHP client for the TinyPNG API, Read more at official TinyPNG documentation.

To generate docs use MKDocs

Installation

composer require robopuff/tinypng

Usage

$tinyPng = new \TinyPng\TinyPng(new \TinyPng\Client\GuzzleClient('your_api_key'));
$tinyPng
    ->optimize(new \TinyPng\Input\Filesystem('unoptimized_image.png'))
    ->store(new \TinyPng\Output\Storage\Filesystem('optimized_image.png'));

Running tests

composer test-suite

Integration tests

TINYPNG_KEY=$YOUR_API_KEY composer test-integration

License

This software is licensed under the BSD-3-Clause License. View the license.

About

TinyPNG API implementation in PHP

https://robopuff.github.io/tinypng/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PHP 100.0%