2017 © Pedro Peláez
 

library laravellqip

LQIP Image handling for laravel.

image

pyaehein/laravellqip

LQIP Image handling for laravel.

  • Thursday, June 8, 2017
  • by nnieheayp
  • Repository
  • 2 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PyaeHein / Laravel LQIP

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

Laravel LQIP package, which includes: - low quality image auto creating ; - replace src with lazysize, (*2)

Install on Laravel 5.4

1) Run in your terminal:, (*3)

``` bash $ composer require pyaehein/laravellqip, (*4)


2) Add the service providers in config/app.php: ``` php PyaeHein\LQIP\LQIPServiceProvider::class,

3) Then run a few commands in the terminal: ``` bash $ php artisan vendor:publish, (*5)


4) Add the script in your blade's head ```html <script src="{{ asset('vendor/lqip/lazysizes/lazysizes.min.js')}}" async=""></script>

```html , (*6)

.blur-up.lazyloaded {
    -webkit-filter: blur(0);
    filter: blur(0);
}

, (*7)


5) Apply your image like this ```html <img {!! lqip('helloworld.jpg') !!} class="lazyload blur-up" >

6) Add storage disk at filesystems.php, (*8)

'lqip' => [
            'driver' => 'local',
            'root' => public_path('uploads/images')
        ],

7) Change your lqip config at config/lqip.php, (*9)

return [

    'path' => 'uploads/images',

    'disk' => 'lqip',

    'prefix' => '_lqip',

    'format' => 'jpg',

    'blur' => '99', // 0 to 100

    'quality' => '1' // 0 to 100

];

Remember

Config file's 'path' is used for Image Library Intervention to auto create lqip image. Because, it doesn't support laravel's filesystem. So, your lqip image can be create only in your public folder :(, (*10)

Note

I just make it for my project requirement. So, it can't be match like what u want., (*11)

Credits

License

Laravel LQIP is free for non-commercial use., (*12)

The Versions

08/06 2017

dev-master

9999999-dev

LQIP Image handling for laravel.

  Sources   Download

MIT

The Requires

 

by Pyae Hein

laravel image lqip

08/06 2017

v0.1.1

0.1.1.0

LQIP Image handling for laravel.

  Sources   Download

MIT

The Requires

 

by Pyae Hein

laravel image lqip