定制 bennothommo/wn-lazy-load-plugin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

bennothommo/wn-lazy-load-plugin

最新稳定版本:v1.0.1

Composer 安装命令:

composer require bennothommo/wn-lazy-load-plugin

包简介

Lazy load images by default in Winter CMS

README 文档

README

Please note that this plugin has been abandoned.
It was done as a proof-of-concept, and was not thoroughly tested. It has been reported that it breaks AJAX queries, and I feel it's best suited for theme developers to apply lazy loading in a pragmatic way in their theme, as opposed to using a plugin to blindly add it to all images. Please feel free to fork and continue working on this plugin if you find it useful.


Lazy Loading plugin

Makes Winter CMS pages lazy-load images by default. This uses the loading="lazy" attribute that is available as part of the HTML Living Standard and is available in all modern browsers, except Safari, since early 2020.

To prevent layout shifting, this attribute is only added automatically to images that have a defined width and height attribute. It will also ignore any images that have specified their own loading attribute as well, allowing developers to control the loading attribute as necessary.

A new setting is made available to the Pages form, Lazy load images, which allows developers to disable lazy loading on a per-page basis.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-14