Giter Site home page Giter Site logo

kingschnulli / froshlazysizes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from friendsofshopware/froshlazysizes

0.0 0.0 0.0 550 KB

This plugin allows you to use lazy loading for your images.

License: MIT License

JavaScript 11.96% PHP 32.38% SCSS 1.77% Twig 53.90%

froshlazysizes's Introduction

LazySizes for Shopware 6

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.