Skip to content

Commit 9289c07

Browse files
Update BlockPlugin.php
1 parent 5b1dc65 commit 9289c07

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Plugin/BlockPlugin.php

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

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

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

87+
$html = str_replace(' data-original=', $pixelSrc . ' data-original=', $html);
88+
8789
$html = str_replace($tmpSrc, $pixelSrc, $html);
8890
$html = str_replace(self::LAZY_TAG, '', $html);
8991

0 commit comments

Comments
 (0)