square1 / resized
On-demand image manipulation service.
Installs: 81 745
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 10
Forks: 3
Open Issues: 0
Requires
- php: ~7.2|~8.0
Requires (Dev)
- phpunit/phpunit: ~9.5.9
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.3
This package is auto-updated.
Last update: 2024-11-16 17:21:36 UTC
README
This is the PHP client for resized.co, a realtime image resize manipulation service.
Install
Via Composer
$ composer require square1/resized
Usage
//Initialize and authenticate $resized = new \Square1\Resized\Resized('key', 'secret'); //Override host if applicable $resized->setHost('https://img.resized.co'); //Set the default failover image $resized->setDefaultImage('http:/www.example.com/no-image.jpg'); //Set default options $resized->setDefaultOptions(['quality' => 100]); //Process image resize with the parameters: ($url, $width, $height, $title) $img = $resized->process('http://www.example.com/some-image.jpg', '100', '100', 'This is a title');
Testing
$ composer test
License
The MIT License (MIT). Please see License File for more information.