Skip to content

Commit afbbc74

Browse files
committed
MC-23383: Introduce image lazy loading mechanism
- Fix static fails;
1 parent e0f40b8 commit afbbc74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/image_with_borders.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar(
2424
<?php endforeach; ?>
2525
src="<?= $escaper->escapeUrl($block->getImageUrl()) ?>"
2626
loading="lazy"
27-
<!-- Enable lazy loading for images with borders and if variable
28-
enable_lazy_loading_for_images_without_borders in view.xml is enabled -->
29-
<?php if ($borders || $enableLazyLoadingWithoutBorders) : ?>
27+
<!-- Enable lazy loading for images with borders and if variable
28+
enable_lazy_loading_for_images_without_borders in view.xml is enabled -->
29+
<?php if ($borders || $enableLazyLoadingWithoutBorders): ?>
3030
width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
3131
height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
32-
<?php else : ?>
32+
<?php else: ?>
3333
max-width="<?= $escaper->escapeHtmlAttr($block->getWidth()) ?>"
3434
max-height="<?= $escaper->escapeHtmlAttr($block->getHeight()) ?>"
3535
<?php endif; ?>

0 commit comments

Comments
 (0)