agoat / contao-deferredimages
Contao 4 延迟图像库
1.4.1
2019-01-08 06:59 UTC
Requires
- php: ^7.1
- ext-gd: *
- contao/core-bundle: ^4.4
- contao/image: ^0.3.5
- contao/imagine-svg: ^0.1.2 || ^0.2
- symfony/framework-bundle: 3.4.* || 4.1.* || 4.2.*
Requires (Dev)
- phpunit/phpunit: ~4.5
Replaces
- contao-legacy/imageondemand: *
README
现在兼容 Contao 4.6 !!
关于
Contao 通常在页面生成过程中(调整大小)生成图像。这可能导致页面加载时间过长,或者在最坏的情况下,由于服务器限制导致脚本超时。
这个库将图像计算从页面生成时间移到浏览器加载图像的时间。因此,页面将具有非常短的加载时间,即使页面上有数百张图像,也能避免脚本超时。
安装
Contao 管理器
搜索包并安装它
agoat/contao-deferredimages
管理版
添加包
# Using the composer
composer require agoat/contao-deferredimages
注册和配置由管理插件自动完成。
标准版
添加包
# Using the composer
composer require agoat/contao-deferredimages
在 AppKernel 中注册捆绑包
# app/AppKernel.php class AppKernel { // ... public function registerBundles() { $bundles = [ // ... // after Contao\CoreBundle\ContaoCoreBundle new Agoat\DeferredImagesBundle\AgoatDeferredImagesBundle(), ]; } }