Download the PHP package shortpixel/shortpixel-php without Composer
On this page you can find all versions of the php package shortpixel/shortpixel-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shortpixel/shortpixel-php
More information about shortpixel/shortpixel-php
Files in shortpixel/shortpixel-php
Package shortpixel-php
Short Description ShortPixel PHP SDK. Read more at https://shortpixel.com/api-tools
License MIT
Homepage https://shortpixel.com/api
Informations about the package shortpixel-php
ShortPixel SDK and API client for PHP
PHP client for the ShortPixel API, used for ShortPixel ShortPixel optimizes your images and improves website performance by reducing images size. Read more at http://shortpixel.com.
Documentation
Go to the documentation for the PHP client.
Installation
Install the API client with Composer. Add this to your composer.json
:
Then install with:
Use autoloading to make the client available in PHP:
Alternatively, if you don't use Composer, add the following require to your PHP code:
Get your API Key from https://shortpixel.com/free-sign-up
Usage
There are more code examples in the examples/integration.php file.
Alternatively, you might want to add the call to a cron job using the cmdShortPixelOptimizer.php script found in lib/. More details about its usage here: ShortPixel CLI
Running tests
Integration tests
Currently the integration tests were taken out in a separate project, at github's request (contained more than 200Mb test images). If you want to run the integration tests by yourself, please contact us and will provide the integration tests.
License
This software is licensed under the MIT License. View the license.
All versions of shortpixel-php with dependencies
ext-curl Version *
ext-json Version *
lib-curl Version >=7.20.0