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 8
8
/** @var $block \Magento\Catalog\Block\Product\Image */
9
9
/** @var $escaper \Magento\Framework\Escaper */
10
10
$ 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
+ );
12
15
?>
13
16
14
17
<span class="product-image-container"
@@ -21,11 +24,12 @@ $enableLazyLoadingWithoutBorders = (bool)$block->getVar('enable_lazy_loading_for
21
24
<?php endforeach ; ?>
22
25
src="<?= $ escaper ->escapeUrl ($ block ->getImageUrl ()) ?> "
23
26
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 ) : ?>
26
30
width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
27
31
height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
28
- <?php else :?>
32
+ <?php else : ?>
29
33
max-width="<?= $ escaper ->escapeHtmlAttr ($ block ->getWidth ()) ?> "
30
34
max-height="<?= $ escaper ->escapeHtmlAttr ($ block ->getHeight ()) ?> "
31
35
<?php endif ; ?>
You can’t perform that action at this time.
0 commit comments