Magento – Lazy load Js not working in Magento2.3.1 Version

lazyloadmagento2

We use Magento2.3.1, in product list page showing error like

Uncaught TypeError: $(…).lazyload is not a function.

While using Porto theme of Magento 2.x.

Best Answer

To complete this Answer. Soundararajan m is correct but he doesn't specify which files to update. They're located at

app/design/frontend/Smartwave/porto/Mageplaza_AjaxLayer/web/js/view/layer.js app/design/frontend/Smartwave/porto/Mageplaza_LayeredNavigation/web/js/view/layer.js

Update the top of the layer.js file to this


define([
    'jquery',
    'Mageplaza_AjaxLayer/js/action/submit-filter',
    'Magento_Catalog/js/price-utils',
    'jquery/ui',
    'accordion',
    'js/jquery.lazyload',
    'productListToolbarForm'
], function ($, submitFilterAction, ultil) {
...

This will solve this error.

Related Topic