承接 pyaehein/laravellqip 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pyaehein/laravellqip

Composer 安装命令:

composer require pyaehein/laravellqip

包简介

LQIP Image handling for laravel.

README 文档

README

Latest Version on Packagist Software License Total Downloads

Laravel LQIP package, which includes:

  • low quality image auto creating ;
  • replace src with lazysize

Install on Laravel 5.4

  1. Run in your terminal:
$ composer require pyaehein/laravellqip
  1. Add the service providers in config/app.php:
PyaeHein\LQIP\LQIPServiceProvider::class,
  1. Then run a few commands in the terminal:
$ php artisan vendor:publish
  1. Add the script in your blade's head
<script src="{{ asset('vendor/lqip/lazysizes/lazysizes.min.js')}}" async=""></script>
<style>
	.blur-up {
		-webkit-filter: blur(25px);
		filter: blur(25px);
		transition: filter 400ms, -webkit-filter 400ms;
	}

	.blur-up.lazyloaded {
		-webkit-filter: blur(0);
		filter: blur(0);
	}
</style>
  1. Apply your image like this
<img {!! lqip('helloworld.jpg') !!} class="lazyload blur-up" >
  1. Add storage disk at filesystems.php
'lqip' => [
            'driver' => 'local',
            'root' => public_path('uploads/images')
        ],
  1. Change your lqip config at config/lqip.php
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 :(

Note

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

Credits

License

Laravel LQIP is free for non-commercial use.

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固