abraia/abraia

This package is abandoned and no longer maintained. No replacement package was suggested.

Abraia PHP SDK

This package has no released version yet, and little information is available.


README

PHP version Build Status Coverage Status

Abraia API client for PHP

PHP client for Abraia services. It is used to smartly optimize images for web.

Install

Install the PHP client:

composer install abraia/abraia

And configure your free API key as the ABRAIA_KEY environment variable:

export ABRAIA_KEY=your_api_key

Usage

Most common operations can be easily performed using the fluent API. Automatically optimize your JPEG, PNG, GIF, SVG, and WebP images without any parameterization.

$abraia = new Abraia\Abraia();

$abraia->fromFile('images/tiger.jpg')->toFile('images/optimized.jpg')

Resize and optimize an image to a maximum size preserving the aspect ratio.

$abraia->fromFile('images/tiger.jpg')->resize(500, 500, 'thumb')->toFile('images/roptim.jpg');

Resized tiger image

Tiger image resized and optimized preserving the aspect ratio

Smartly crop and optimize an image to change its aspect ratio.

$abraia->fromFile('images/tiger.jpg')->resize(500, 500)->toFile('images/resized.jpg');

Smart cropped tiger

Tiger image automatically smart cropped to show a square aspect ratio

License

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