Laravel Proximage is a handy package for proxying images.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
src
tests
.gitattributes
.gitignore
.styleci.yml
CHANGELOG.md
CONTRIBUTING.md
LICENSE.md
README.md
composer.json
logo.png
phpunit.xml.dist

README.md

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.