File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
app/code/Magento/Catalog/view/frontend/templates/product Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 88/** @var $block \Magento\Catalog\Block\Product\Image */
99/** @var $escaper \Magento\Framework\Escaper */
1010$ borders = (bool )$ block ->getVar ('product_image_white_borders ' , 'Magento_Catalog ' );
11- $ enableLazyLoadingWithoutBorders = (bool )$ block ->getVar ('enable_lazy_loading_for_images_without_borders ' , 'Magento_Catalog ' );
11+ $ enableLazyLoadingWithoutBorders = (bool )$ block ->getVar (
12+ 'enable_lazy_loading_for_images_without_borders ' ,
13+ 'Magento_Catalog '
14+ );
1215?>
1316
1417<span class="product-image-container"
@@ -21,11 +24,12 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar('enable_lazy_loading_for
2124 <?php endforeach ; ?>
2225 src="<?= $ escaper ->escapeUrl ($ block ->getImageUrl ()) ?> "
2326 loading="lazy"
24- <!-- Enable lazy loading for images with borders and if variable enable_lazy_loading_for_images_without_borders in view.xml is enabled -->
25- <?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 ) : ?>
2630 width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
2731 height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
28- <?php else :?>
32+ <?php else : ?>
2933 max-width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
3034 max-height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
3135 <?php endif ; ?>
You can’t perform that action at this time.
0 commit comments