mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Native Lazy loading support added to {NEWS_IMAGE} shortcode. eg. {NEWS_IMAGE: loading=lazy}
This commit is contained in:
@@ -819,7 +819,7 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
if(!empty($parm['placeholder']))
|
||||
{
|
||||
return $this->sc_newsimage('placeholder');
|
||||
return $this->sc_newsimage('placeholder');
|
||||
}
|
||||
elseif($video = e107::getParser()->toVideo($this->imageItem, array('class'=> 'news-media news-media-'.$parm['item'])))
|
||||
{
|
||||
@@ -987,10 +987,11 @@ class news_shortcodes extends e_shortcode
|
||||
$style = !empty($this->param['thumbnail']) ? $this->param['thumbnail'] : '';
|
||||
|
||||
$imgParms = array(
|
||||
'class'=>$class,
|
||||
'alt'=>basename($srcPath),
|
||||
'style'=>$style,
|
||||
'placeholder'=>varset($parm['placeholder'])
|
||||
'class' => $class,
|
||||
'alt' => basename($srcPath),
|
||||
'style' => $style,
|
||||
'placeholder' => varset($parm['placeholder']),
|
||||
'loading' => varset($parm['loading'],'auto'),
|
||||
);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user