Broken image is visible before lazyloading
johnny-longneck opened this issue · 1 comments
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
More than likely your issue has to do with "swatch-option-loading" CSS class
.swatch-option-loading {
content: url(../../frontend/MagePal/theme/en_US/Magento_Swatches/images/loader-2.gif);
}
Take a look at https://github.com/magepal/magento2-catalog-lazy-load/blob/master/Plugin/Block/Product/ImagePlugin.php#L30
See
If you add "swatch-option-loading" to any category images it should show the loading image eg
<img class="photo image swatch-option-loading" src=...