| Package Data | |
|---|---|
| Maintainer Username: | ciaranmaher |
| Maintainer Contact: | ciaran@square1.io (Ciaran Maher) |
| Package Create Date: | 2016-02-25 |
| Package Last Update: | 2021-09-16 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-02 15:11:49 |
| Package Statistics | |
|---|---|
| Total Downloads: | 83,668 |
| Monthly Downloads: | 733 |
| Daily Downloads: | 0 |
| Total Stars: | 2 |
| Total Watchers: | 8 |
| Total Forks: | 2 |
| Total Open Issues: | 0 |
This is the Laravel 5 package for resized.co, an on-demand image resize manipulation service.
Via Composer
$ composer require square1/resized-laravel
To use the Resized Service Provider, you must register the provider when bootstrapping your Laravel application.
Find the providers key in your config/app.php and register the Resized Service Provider.
'providers' => array(
// ...
Square1\Laravel\Resized\ResizedServiceProvider::class,
)
Find the aliases key in your config/app.php and add the Resized facade alias.
'aliases' => array(
// ...
'Resized' => Square1\Laravel\Resized\ResizedFacade::class,
)
By default, the package uses the following environment variables to auto-configure the plugin without modification:
RESIZED_KEY
RESIZED_SECRET
RESIZED_DEFAULT_IMAGE
Set the default failover image.
Resized::setDefaultImage('http://www.example.com/no-image.jpg');
Generate a 300x500 resized image URL.
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '500');
Generate an image URL that is contrained to 300 width whilst mantaining aspect ratio.
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '');
Generate an image URL that is contrained to 500 height whilst mantaining aspect ratio.
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '', '500');
Override image slug.
$url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '500', 'A nice image name');
$ composer test
The MIT License (MIT). Please see License File for more information.