Skip to content

Commit ee7a4bb

Browse files
committed
Merge branch 'pr-34558' into 2.4-develop-prs
2 parents 8a89643 + c08e3f9 commit ee7a4bb

File tree

8 files changed

+9
-7
lines changed

8 files changed

+9
-7
lines changed

app/code/Magento/Catalog/view/base/web/template/product/list/columns/image.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
attr="href: $row().url">
1010
<img if="imageExists($row())"
1111
class="product-image-photo"
12+
loading="lazy"
1213
attr="src: getImageUrl($row()),
1314
alt: getLabel($row()),
1415
title: getLabel($row()),

app/code/Magento/Catalog/view/base/web/template/product/list/columns/image_with_borders.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<span class="product-image-wrapper"
1414
data-bind="style: {'padding-bottom': getHeight($row())/getWidth($row()) * 100 + '%'}">
1515
<img class="product-image-photo"
16+
loading="lazy"
1617
data-bind="attr: {src: getImageUrl($row()),
1718
alt: getLabel($row()), title: getLabel($row())}" />
1819
</span>

app/code/Magento/Catalog/view/frontend/web/template/product/image.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
<img class="photo image" data-bind="attr: {src: src, alt: alt}, style: {width: width + 'px', height: height + 'px'}" />
7+
<img class="photo image" loading="lazy" data-bind="attr: {src: src, alt: alt}, style: {width: width + 'px', height: height + 'px'}" />

app/code/Magento/Catalog/view/frontend/web/template/product/image_with_borders.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
-->
77
<span class="product-image-container" data-bind="style: {width: width/2 + 'px'}">
8-
<span class="product-image-wrapper" data-bind="style: {'padding-bottom': height/width*100 + '%'}">
9-
<img class="product-image-photo" data-bind="attr: {src: src, alt: alt}, style: {width: 'auto', height: 'auto'}" />
8+
<span class="product-image-wrapper" data-bind="style: {'padding-bottom': height/width*100 + '%'}">
9+
<img class="product-image-photo" loading="lazy" data-bind="attr: {src: src, alt: alt}, style: {width: 'auto', height: 'auto'}" />
1010
</span>
1111
</span>

app/code/Magento/Checkout/view/frontend/web/template/summary/item/details/thumbnail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
data-bind="attr: {'style': 'height: ' + getHeight($parents[1])/2 + 'px; width: ' + getWidth($parents[1])/2 + 'px;' }">
99
<span class="product-image-wrapper">
1010
<img
11-
data-bind="attr: {'src': getSrc($parents[1]), 'width': getWidth($parents[1]), 'height': getHeight($parents[1]), 'alt': getAlt($parents[1]), 'title': getAlt($parents[1]) }"/>
11+
data-bind="attr: {'src': getSrc($parents[1]), 'width': getWidth($parents[1]), 'height': getHeight($parents[1]), 'alt': getAlt($parents[1]), 'title': getAlt($parents[1]) }" loading="lazy"/>
1212
</span>
1313
</span>

app/code/Magento/Ui/view/base/web/templates/dynamic-rows/cells/thumbnail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
<img class="admin__control-thumbnail" style="max-height: 75px; max-width: 75px;" data-bind="attr: {src: $data.value}"/>
7+
<img class="admin__control-thumbnail" style="max-height: 75px; max-width: 75px;" data-bind="attr: {src: $data.value}" loading="lazy"/>

app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
-->
77
<span class="thumbnail-container">
88
<span class="thumbnail-wrapper">
9-
<img class="admin__control-thumbnail" attr="src: $col.getSrc($row()), alt: $col.getAlt($row())"/>
9+
<img class="admin__control-thumbnail" attr="src: $col.getSrc($row()), alt: $col.getAlt($row())" loading="lazy"/>
1010
</span>
1111
</span>

app/code/Magento/Ui/view/base/web/templates/grid/cells/thumbnail/preview.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<div class="thumbnail-preview" data-role="thumbnail-preview">
99
<div class="thumbnail-preview-image-block">
10-
<img class="thumbnail-preview-image" src="<%- src %>" alt="<%- alt %>" />
10+
<img class="thumbnail-preview-image" src="<%- src %>" alt="<%- alt %>" loading="lazy"/>
1111
</div>
1212
<div class="thumbnail-preview-content">
1313
<a class="thumbnail-preview-link" href="<%- link %>"><%- linkText %></a>

0 commit comments

Comments
 (0)