Description
PHP implementation of URL generator for Thumbor
Thumbor PHP alternatives and similar libraries
Based on the "API" category.
Alternatively, view thumbor-php alternatives based on common mentions on social networks and blogs.
-
Jane
:seedling: Jane is a set of libraries to generate Models & API Clients based on JSON Schema / OpenAPI specs -
Tomato Framework (Laravel)
TomatoPHP is built to make it easy to develop web apps and API by generating files of CRUD operations and support helpers of tonnes of functions to make it easy to manage and use framework services.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of Thumbor PHP or a related project?
Popular Comparisons
README
Thumbor PHP
PHP implementation of URL generator for Thumbor
This package has laravel support, and brings its conveniences like Facade and Service Provider.
At the same time, it was made to be filly functional as framework-agnostic.
Supported PHP versions: 7.4, 8.0, 8.1
Installation
Require this package with composer using the following command:
composer require beeyev/thumbor-php
Laravel
This package will be automatically registered using Laravel auto-discovery mechanism.
Publish the config file of this package with this command. It will generate config file config/thumbor.php
, look at this file to set the required parameters.
php artisan vendor:publish --provider="Beeyev\Thumbor\Adapters\Laravel\ThumborServiceProvider" --tag=config
Usage examples
Laravel using dependency injection
use Beeyev\Thumbor\Thumbor;
public function someMethod(Thumbor $thumbor)
{
$result = $thumbor->resize(200,500)->get('http://seriouscat.com/serious_cat.jpg');
}
Laravel using facade
use Beeyev\Thumbor\Manipulations\Fit;
use Beeyev\Thumbor\Manipulations\Trim;
public function someMethod()
{
$result = \Thumbor::resizeWidth(500)
->fit(Fit::FIT_IN)
->trim(Trim::BOTTOM_RIGHT)
->get('http://seriouscat.com/serious_cat.jpg');
}
Some more framework-agnostic examples
use Beeyev\Thumbor\Thumbor;
use Beeyev\Thumbor\Manipulations\Resize;
public function someMethod()
{
$thumbor = new Thumbor('https://thumbor.findtheinvisiblecow.com/', 'secretKey555');
$thumbor->addFilter('strip_icc');
$thumbor->addFilter('blur', 1);
$thumbor->resize(500, Resize::ORIG);
$thumbor->smartCropEnable();
$thumbor->imageUrl('http://seriouscat.com/serious_cat.jpg');
return $thumbor->get();
}
Issues
Bug reports and feature requests can be submitted on the Github Issue Tracker.
License
The MIT License (MIT). Please see License File for more information.
If you love this project, please consider giving me a ⭐
*Note that all licence references and agreements mentioned in the Thumbor PHP README section above
are relevant to that project's source code only.