From 762beb7c1cdf8f5c5b561a6fc43d0b0a74d31f84 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 3 Nov 2022 14:02:01 +1100 Subject: [PATCH] Load product images in the shop lazily The browser decides when to load the image, usually when it's close to the viewport. --- app/views/shop/products/_summary.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shop/products/_summary.html.haml b/app/views/shop/products/_summary.html.haml index c87d26ff46..0d53443562 100644 --- a/app/views/shop/products/_summary.html.haml +++ b/app/views/shop/products/_summary.html.haml @@ -2,7 +2,7 @@ %a{"ng-click" => "triggerProductModal()"} %span.product-thumb__bulk-label{"ng-if" => "::product.group_buy"} = t(".bulk") - %img{"ng-src" => "{{::product.primaryImageOrMissing}}"} + %img{"ng-src" => "{{::product.primaryImageOrMissing}}", loading: "lazy"} .summary .summary-header