2017 © Pedro Peláez
 

library resized-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

image

square1/resized-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

  • Thursday, July 28, 2016
  • by ciaranmaher
  • Repository
  • 3 Watchers
  • 0 Stars
  • 4,364 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 19 % Grown

The README.md

Resized

Latest Version on Packagist ![Software License][ico-license] Build Status ![Total Downloads][ico-downloads], (*1)

This is the Laravel package for resized.co, an on-demand image resize manipulation service., (*2)

Install

Via Composer, (*3)

``` bash $ composer require square1/resized-laravel, (*4)


Version 2 removed support for PHP7.1 - if you require it, run ``` bash $ composer require square1/resized-laravel:1.1

To use the Resized Service Provider, you must register the provider when bootstrapping your Laravel application., (*5)

Find the providers key in your config/app.php and register the Resized Service Provider., (*6)

    'providers' => array(
        // ...
        Square1\Laravel\Resized\ResizedServiceProvider::class,
    )

Find the aliases key in your config/app.php and add the Resized facade alias., (*7)

    'aliases' => array(
        // ...
        'Resized' => Square1\Laravel\Resized\ResizedFacade::class,
    )

Configuration

By default, the package uses the following environment variables to auto-configure the plugin without modification:, (*8)

RESIZED_KEY
RESIZED_SECRET
RESIZED_DEFAULT_IMAGE

Usage

Set the default failover image., (*9)

``` php Resized::setDefaultImage('http://www.example.com/no-image.jpg');, (*10)


Generate a 300x500 resized image URL. ``` php $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., (*11)

``` php $url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '');, (*12)


Generate an image URL that is contrained to 500 height whilst mantaining aspect ratio. ``` php $url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '', '500');

Override image slug., (*13)

``` php $url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '300', '500', 'A nice image name');, (*14)


Specify the compression level through the options array. >Data ranging from 0 (poor quality, small file) to 100 (best quality, big file). Quality is only applied if you're encoding JPG format since PNG compression is lossless and does not affect image quality. Default: 90. ``` php $url = Resized::process('http://www.example.com/some-image-to-resize.jpg', '', '500', 'A nice image name', ['quality' => 100]);

Testing

bash $ composer test, (*15)

License

The MIT License (MIT). Please see License File for more information., (*16)

The Versions

28/07 2016

dev-master

9999999-dev https://github.com/square1-io/resized-php-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image manipulation square1 resized

28/07 2016

v1.0.3

1.0.3.0 https://github.com/square1-io/resized-php-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image manipulation square1 resized

14/03 2016

v1.0.2

1.0.2.0 https://github.com/square1-io/resized-php-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image manipulation square1 resized

14/03 2016

v1.0.1

1.0.1.0 https://github.com/square1-io/resized-php-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image manipulation square1 resized

09/03 2016

v1.0

1.0.0.0 https://github.com/square1-io/resized-php-laravel

Laravel 5 package for resized.co, the on-demand image manipulation service.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel image manipulation square1 resized