agoat/contao-deferredimages

Contao 4 延迟图像库

安装: 276

依赖: 0

建议者: 0

安全性: 0

星标: 1

关注者: 2

分支: 0

开放问题: 4

类型:contao-bundle

1.4.1 2019-01-08 06:59 UTC

README

Version License Downloads

现在兼容 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(),
        ];
    }
}