coderello/laravel-proximage

Image proxy for Laravel.

0.5.0 2018-10-24 07:56 UTC

README

Proximage

Proximage is a handy package for proxying images through the images.weserv.nl (free image cache & resize service) with which you can greatly increase the performance of the site.

To learn all about it, head over to the documentation.

Installation

You can install this package via composer using this command:

composer require coderello/laravel-proximage

The package will automatically register itself.

Examples of use

Only caching:

proximage($imageUrl)
  ->get();

Caching and resizing:

proximage($imageUrl)
  ->width(300)
  ->get();

Caching and cropping:

use Coderello\Proximage\Enums\Parameter;
proximage($imageUrl)
  ->crop(Parameter\CropAlignment::CENTER)
  ->transformation(Parameter\Transformation::SQUARE)
  ->get();

Documentation

You'll find the documentation on https://docs.coderello.com/laravel-proximage.

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving the media library? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.

Testing

You can run the tests with:

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

License

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