Skip to content

Commit 09feace

Browse files
committed
Compatible loading="lazy"
1 parent 2043440 commit 09feace

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Plugin/SpeedOptimizer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ public function addLazyloadImage($content, $placeholder)
219219
function($match) use ($placeholder) {
220220

221221
if(stripos($match[0], ' data-src="') !== false) return $match[0];
222+
if(stripos($match[0], ' loading="lazy"') !== false) return $match[0];
222223
if(stripos($match[0], ' class="') !== false){
223224
if( $this->isExclude($match[1]) ) return $match[0];
224225
$lazy = str_replace(' class="', ' class="lazyload ', (string) $match[0]);

0 commit comments

Comments
 (0)