2017 © Pedro Peláez
 

library imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

image

alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  • Tuesday, February 6, 2018
  • by alexgiuvara
  • Repository
  • 1 Watchers
  • 0 Stars
  • 33 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 6 % Grown

The README.md

Latest Stable VersionTotal Downloads, (*1)

img-proxy

Laravel Service Provider for Golang ImgProxy micro-service https://evilmartians.com/chronicles/introducing-imgproxy, (*2)

Install

Works with Laravel 5.1 - 5.7 / PHP 7.0 - 7.2, probably 7.3 too, (*3)

  • composer require alexgiuvara/imgproxy
  • copy the ServiceProvider to the providers array in config/app.php. Laravel 5.5 users with auto-discovery may skip this step
AlexGiuvara\ImgProxy\ImgProxyServiceProvider::class,
  • copy the package config to your local config with the publish command:
php artisan vendor:publish --provider="AlexGiuvara\\ImgProxy\\ImgProxyServiceProvider"
  • to generate the secrets, you can use this command: echo $(xxd -g 2 -l 64 -p /dev/random | tr -d '\n'), (*4)

  • env file:, (*5)

# img-proxy.base_url
IMGPROXY_URL=https://img-proxy-example.com
# your img-proxy key
IMGPROXY_KEY=943b421c9eb07c830af81030552c86009268de4e532ba2ee2eab8247c6da0881
# your img-proxy salt
IMGPROXY_SALT=520f986b998545b4785e0defbc4f3c1203f22de2374a3d53cb7a7fe9fea309c5

This package does not cover the Authorization header., (*6)

Usage

helper:, (*7)

imgProxy('https://www.nasa.gov/sites/default/files/images/528131main_PIA13659_full.jpg', 640, 360)
use AlexGiuvara\ImgProxy\Contracts\ImageSignatureInterface;
use AlexGiuvara\ImgProxy\Image;

Route::get('/img-test', function () {
    $path      = 'https://www.nasa.gov/sites/default/files/images/528131main_PIA13659_full.jpg';
    $width     = 640;
    $height    = 360;
    $pic       = new Image;
    $pic->setOriginalPictureUrl($path)
        ->setWidth($width)
        ->setHeight($height)
        ->setResize('fit')
        ->setGravity('no')
        ->setEnlarge(0)
        ->setExtension('png');
    app()->instance(Image::class, $pic);
    $signature = app(ImageSignatureInterface::class);

    echo '
    Resized: <img src="' . config('img-proxy.base_url') . $signature->take() . '" alt="Resized">
    <br>
    Original: <img src="' . $path . '" alt="Original">
    ';

});

The Versions

06/02 2018

dev-master

9999999-dev https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service imgproxy

06/02 2018

v0.0.12

0.0.12.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service imgproxy

18/01 2018

v0.0.11

0.0.11.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service imgproxy

18/01 2018

v0.0.10

0.0.10.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service imgproxy

17/01 2018

v0.0.9

0.0.9.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service imgproxy

15/01 2018

v0.0.8

0.0.8.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service

14/01 2018

v0.0.7

0.0.7.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider for imgproxy: Resize your images instantly and securely

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel image proxy resize micro-service

14/01 2018

v0.0.6

0.0.6.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider that retrieves resized images from a image proxy micro-service

  Sources   Download

MIT

The Development Requires

laravel microservice image proxy

14/01 2018

v0.0.5

0.0.5.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider that retrieves resized images from a image proxy micro-service

  Sources   Download

MIT

The Development Requires

laravel microservice image proxy

13/01 2018

v0.0.4

0.0.4.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider that retrieves resized images from a image proxy micro-service

  Sources   Download

MIT

The Development Requires

laravel microservice image proxy

09/01 2018

v0.0.3

0.0.3.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider that retrieves resized images from a image proxy micro-service

  Sources   Download

MIT

The Development Requires

laravel microservice image proxy

09/01 2018

v0.0.2

0.0.2.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider that retrieves resized images from a image proxy micro-service

  Sources   Download

MIT

The Development Requires

laravel microservice image proxy

09/01 2018

v0.0.1

0.0.1.0 https://github.com/alexgiuvara/imgproxy

Laravel Service Provider that retrieves resized images from a image proxy micro-service

  Sources   Download

MIT

The Development Requires

laravel microservice image proxy