minifranske/lazy-load-placeholder
Composer 安装命令:
composer require minifranske/lazy-load-placeholder
包简介
Create placeholders for lazy loading images for instance based on the dominant image color
README 文档
README
This extension adds metadata extractor that detects/calculates the dominant color of an images after upload. The dominant color can be used in FE rendering of images to fill the empty places of the lazy loaded images.
Features:
- metadata extractor to pick/store the dominant color of every uploaded image
llp:lazyImageviewhelper that can be used as replacement off:imagethesrcbecomes adata:image/svg+xml;base64string that holds a svg placeholder image in the dominant color the real image is added todata-src- property
dominant_coloris added to the properties of every image object{image.properties.dominant_color}
This extension is inspired by the blog Dominant Colors for Lazy-Loading Images and uses ksubileau/color-thief-php to detect the dominant color of the image.
统计信息
- 总下载量: 1.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2017-03-05