Skip to content

Commit c505d22

Browse files
authored
Merge pull request #23 from magefan/add-mfdislazy-attribute-to-skip-lazyload
Add mfdislazy attribute to skip lazyload
2 parents 83cf510 + 9289c07 commit c505d22

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Plugin/BlockPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function afterToHtml(\Magento\Framework\View\Element\AbstractBlock $block
7777

7878
$html = str_replace($pixelSrc, $tmpSrc, $html);
7979

80-
$html = preg_replace('#<img\s+([^>]*)(?:\ssrc="([^"]*)")([^>]*)\/?>#isU', '<img ' .
80+
$html = preg_replace('#<img([^>]*)(?:\ssrc="([^"]*)")([^>]*)\/?>#isU', '<img ' .
8181
' data-original="$2" $1 $3/>
8282
<noscript>
8383
<img src="$2" $1 $3 />

Plugin/Magefan/WebP/Api/HtmlParserInterfacePlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function aroundGetNewHtmlTag($subject, callable $proceed, $imagePath, $im
7171

7272
$html = str_replace($pixelSrc, $tmpSrc, $html);
7373

74-
$html = preg_replace('#<source\s+([^>]*)(?:\ssrcset="([^"]*)")([^>]*)?>#isU', '<source ' . $pixelSrc .
74+
$html = preg_replace('#<source([^>]*)(?:\ssrcset="([^"]*)")([^>]*)?>#isU', '<source ' . $pixelSrc .
7575
' data-originalset="$2" $1 $3/>', $html);
7676

7777
$html = str_replace($tmpSrc, $pixelSrc, $html);

Plugin/Magefan/WebP/Model/WebPPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function aroundGetPictureTagHtml($subject, callable $proceed, $imagePath,
7171

7272
$html = str_replace($pixelSrc, $tmpSrc, $html);
7373

74-
$html = preg_replace('#<source\s+([^>]*)(?:\ssrcset="([^"]*)")([^>]*)?>#isU', '<source ' . $pixelSrc .
74+
$html = preg_replace('#<source([^>]*)(?:\ssrcset="([^"]*)")([^>]*)?>#isU', '<source ' . $pixelSrc .
7575
' data-originalset="$2" $1 $3/>', $html);
7676

7777
$html = str_replace($tmpSrc, $pixelSrc, $html);

0 commit comments

Comments
 (0)