1. Go to this page and download the library: Download beeyev/thumbor-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
beeyev / thumbor-php example snippets
use Beeyev\Thumbor\Thumbor;
public function someMethod(Thumbor $thumbor)
{
$result = $thumbor->resizeOrFit(200,500)->get('http://seriouscat.com/serious_cat.jpg');
}
use Beeyev\Thumbor\Manipulations\Fit;
use Beeyev\Thumbor\Manipulations\Trim;
public function someMethod()
{
$result = \Thumbor::addFilter('blur', 3)
->resizeOrFit(500, 300, Fit::FIT_IN)
->trim(Trim::BOTTOM_RIGHT)
->get('http://seriouscat.com/serious_cat.jpg');
}
use Beeyev\Thumbor\Thumbor;
use Beeyev\Thumbor\Manipulations\Resize;
use Beeyev\Thumbor\Manipulations\Filter;
public function someMethod()
{
$thumbor = new Thumbor('https://thumbor.findtheinvisiblecow.com/', 'secretKey555');
$thumbor->addFilter(Filter::STRIP_EXIF);
$thumbor->addFilter(Filter::BLUR, 1);
$thumbor->resizeOrFit(500, Resize::ORIG);
$thumbor->smartCrop();
$thumbor->imageUrl('http://seriouscat.com/serious_cat.jpg');
return $thumbor->get();
}