mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 07:36:32 +02:00
Lazy loading added to bbcode images and avatar images by default.
This commit is contained in:
@@ -4109,9 +4109,10 @@ class e_parse
|
||||
|
||||
$class = !empty($options['class']) ? $options['class'] : $shape . ' user-avatar';
|
||||
$style = !empty($options['style']) ? " style='" . $options['style'] . "'" : '';
|
||||
$loading = !empty($options['loading']) ? " loading='".$options['loading']."'" : " loading='lazy'"; // default to lazy.
|
||||
|
||||
$text = $linkStart;
|
||||
$text .= '<img ' . $id . "class='" . $class . $classOnline . "' alt=\"" . $title . "\" src='" . $url . "' width='" . $width . "' " . $heightInsert . $style . ' />';
|
||||
$text .= '<img ' . $id . "class='" . $class . $classOnline . "' alt=\"" . $title . "\" src='" . $url . "' width='" . $width . "' " . $heightInsert . $style . $loading . ' />';
|
||||
$text .= $linkEnd;
|
||||
|
||||
// return $url;
|
||||
|
Reference in New Issue
Block a user