frosh/lazy-sizes 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

frosh/lazy-sizes

最新稳定版本:3.2.0

Composer 安装命令:

composer require frosh/lazy-sizes

包简介

Automatically calculate the best thumbnail size. This means you don't have to worry about the "sizes" attribute for the images. Additionally, you gain a score.

README 文档

README

Software License Shopware Store

This plugin has built-in Lazyloading with auto generated sizes for best fitting sizes.
2.png

Install

Download the plugin from the release page and enable it in shopware.

By composer

composer require frosh/lazy-sizes

From source

Run npm install in src/Resources/app/storefront within the plugin directory

By zip

download latest release and upload into admin: https://github.com/FriendsOfShopware/FroshLazySizes/releases/latest/download/FroshLazySizes.zip

Adding more thumbnail sizes:

  • Save new size in the folder of the media management
  • then run the command bin/console media:generate-thumbnails on the console to update the thumbnails for all images in the database
  • Clear shop cache

Selectively deactivate plugins lazysizes and lazyloading function

This might be useful to optimize loading images above the fold or if you don't like to use the plugin for specific images or tooltip.

Specific images

Add variable lazysizes with value false before using sw_thumbnails in the template.

Cms sections

Add css class no-lazysizes to your sections

Cms blocks

Add css class no-lazysizes to your block

Overwrite no-lazysizes of sections class in block

Add class lazysizes to your block

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 3
  • Forks: 3
  • 开发语言: Twig

其他信息

  • 授权协议: mit
  • 更新时间: 2022-12-15