File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -72,18 +72,20 @@ public function afterToHtml(\Magento\Framework\View\Element\AbstractBlock $block
7272 return $ html ;
7373 }
7474
75- $ pixelSrc = 'src=" ' . $ block ->getViewFileUrl ('Magefan_LazyLoad::images/pixel.jpg ' ) . '" ' ;
75+ $ pixelSrc = ' src=" ' . $ block ->getViewFileUrl ('Magefan_LazyLoad::images/pixel.jpg ' ) . '" ' ;
7676 $ tmpSrc = 'TMP_SRC ' ;
7777
7878 $ html = str_replace ($ pixelSrc , $ tmpSrc , $ html );
7979
80- $ html = preg_replace ('#<img\s+([^>]*)(?:src="([^"]*)")([^>]*)\/?>#isU ' , '<img ' . $ pixelSrc .
80+ $ html = preg_replace ('#<img\s+([^>]*)(?:src="([^"]*)")([^>]*)\/?>#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
You can’t perform that action at this time.
0 commit comments