Giter Site home page Giter Site logo

magepal / magento2-catalog-lazy-load Goto Github PK

View Code? Open in Web Editor NEW
58.0 5.0 25.0 75 KB

Improve the load time of your Magento 2 categories pages by loading your images on demand with our Lazy Load Extension

Home Page: https://www.magepal.com

PHP 100.00%
magento-extension magento2 magento2-module magento2-extension lazy-loading lazyload lazyload-images lazyloading magento catalog-images-lazy

magento2-catalog-lazy-load's Introduction

magepal

MagePal Extensions - Install our extensions with confidence knowing that they will just work! But if you run into an issue... no problem, we normally solved all issues in 15 minutes or less.

magento2-catalog-lazy-load's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

magento2-catalog-lazy-load's Issues

Lazy loading not working on product view page

Hi,

Lazy loading is not working on product view page for upsell products and related products.

I'm working on a PR to fix this.

Thank you for this simple but clean Magento 2 extension by the way.

Images not loaded if you go through the catalog pagination

Magento version #: 2.2.3

Edition (EE, CE, OS, etc): OS

Expected behavior:

Images are loaded if you paginate through the catalog

Actual behavior:

Images are NOT loaded if you paginate through the catalog, it only shows the first 8 products, this amount is set in the module configuration.

Steps to reproduce:

  1. Go to this page: https://www.hairworldshop.nl/haar.html
  2. Then click at the bottom to go to page 2. url: (https://www.hairworldshop.nl/haar.html?p=2)

Preconditions

The pagination is loaded by AJAX i think this is related, because if you refresh the page https://www.hairworldshop.nl/haar.html?p=2 then it is working.

BTW, i disabled now the module.

screencapture-hairworldshop-nl-haar-html-2019-03-01-15_32_14

Issue after updating to 2.3.3

Magento version #: 2.3.3

Edition (EE, CE, OS, etc): linux

Expected behavior: images should appear and lazy-load correctly

Actual behavior: only 4 images are being loaded(using the 'ignore first x photos' settings)

<img class="lazy product-image-photo" data-original&#x3d;&quot;https&#x3a;&#x2f;&#x2f;avasting.ro&#x2f;pub&#x2f;media&#x2f;catalog&#x2f;product&#x2f;cache&#x2f;5098fac7f63ab917ed5a467c62445137&#x2f;1&#x2f;4&#x2f;14799__cutie-cu-geam-cheder-si-yala-minibox-500x500x150-mm_1.jpg&quot;="" src="" max-width="208" max-height="260" alt="Cutie hidrant interior minibox 500X500X140 avizata CE">

the above doesnt render a picture, this is the output in the frontend of the lazy-loaded images.

Steps to reproduce: avasting.ro

Preconditions

Update from 2.3.2 to 2.3.3
PHP version 7.3

Broken image is visible before lazyloading

Thanks for this module!
It works fine except that images are broken before lazyloading. I found a commented line in your source code, maybe it was removed? why?

Magento version #:

2.2.4

Edition (EE, CE, OS, etc):

CE

Expected behavior:

Images are hidden before lazyloading takes place, or at least a loading gif

Actual behavior:

Broken images are visible

Steps to reproduce:

Install and enable this module, quickly scroll down on category page.

Preconditions

PHP7
Nginx
Varnish
Magento 2.2.4

Can't setup:upgrade

Magento version #: 2.3.2

Edition (EE, CE, OS, etc): CentOS

Expected behavior: bin/magento setup:upgrade should finish and installation should work as expected.

Actual behavior: bin/magento setup:upgrade gets stuck on Schema Creation and the output of Updating modules: is empty

Steps to reproduce:

composer install magepal/magento2-cataloglazyload
bin/magento setup:upgrade

Preconditions

Latest version 2.3.2
Litespeed

system.log:

The following modules are outdated:
MagePal_CatalogLazyLoad schema: current version - none, required version - 1.4.2
MagePal_CatalogLazyLoad data: current version - none, required version - 1.4.2 [] []
[2019-09-17 14:17:50] main.ERROR: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
MagePal_CatalogLazyLoad schema: current version - none, required version - 1.4.2
MagePal_CatalogLazyLoad data: current version - none, required version - 1.4.2 [] []
[2019-09-17 14:17:56] main.ERROR: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
MagePal_CatalogLazyLoad schema: current version - none, required version - 1.4.2
MagePal_CatalogLazyLoad data: current version - none, required version - 1.4.2 [] []

The event 'load' is not called for lazy image loading.

Magento version:

2.4.5-p3

Edition (EE, CE, OS, etc):

EE

Expected behavior:

On category pages, when we scroll, the images should lazy load.

Actual behavior:

On scroll, the images are not lazy loading on mobile version.

Steps to reproduce:

One can activate the the module 'Catalog Lazy Load' and set the 'Skip amount' to like 2. This will load the first 2 images and rest would be loaded on scroll.

.one("load", function() {
                            var original = $self.attr("data-" + settings.data_attribute);
                            $self.hide();
                            if ($self.is("img")) {
                                $self.attr("src", original);
                            } else {
                                $self.css("background-image", "url('" + original + "')");
                            }

I need help to solve the image lazy loading problem that I face in our project. Actually, the 'load' event seems to be never called as we did debugging. So I tried to research a bit, why this event might not be triggered. I did find a post on Stack Overflow that says that 'load' event is a property of window neither document nor body and that one should use window instead. Alternatively, it is suggested to use 'DOMContentLoaded' event instead of 'load'. This actually does not solve my problem. Would it be an idea to adapt that accordingly?
Or could someone think of a reason, why this might happen?
The Stack Overflow page is as follows:

https://stackoverflow.com/questions/58730444/why-load-event-not-working-on-addeventlistener

MDN Web Docs is also suggesting to use 'DOMContentLoaded' compare to 'load' event. More is here please:

https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event

Preconditions

The extension idles image loading

Sometimes the extension idles image loading. A page loads, but images show loading gif. Just after several seconds it completes.

I've got error in system.log:
main.CRITICAL: Class Magepal\CatalogLazyLoad\Helper\Data does not exist [] []

and sometimes (don't know if it is connected with LazyLoad):
main.CRITICAL: Warning: ltrim() expects parameter 1 to be string, object given in /home/[domain]/public_html/vendor/magento/framework/Code/Generator/EntityAbstract.php on line 152 [] []

jQuery.easing[this.easing] is not a function

Magento version #: 2.3.2

Edition (EE, CE, OS, etc): linux

Expected behavior: User scrolls down at the bottom of the page, refreshes page, user gets automatically scrolled down at the last position and images should load

Actual behavior: User scrolls down at the bottom of the page, refreshes page, user gets automatically scrolled down at the last position and images don't load. Console error present.

Steps to reproduce: Go to http://avasting.ro/promotii , scroll down at the last product, refresh page and see the behaviour + the error.

Preconditions

Not working on Porto theme

I have successfully tested the module on Magento/Luma; we are using Porto theme at the moment, but as shown by the Dev Console, images are loading immediately. Do we need to tweak anything to make the module work (CSS classes, etc.)?

Thanks in advance!

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.