Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

question-circle Some questions and requests

  • Сергей_Матюнин
  • Сергей_Матюнин's Avatar Topic Author
  • Offline
More
6 years 3 months ago #5060 by Сергей_Матюнин
Replied by Сергей_Матюнин on topic Some questions and requests
if ($lazyload) {
$item->imagetag = '<img alt="'.$item->title.'" class="lazyload" src="'.JURI::root(true).'/media/syw_latestnewsenhanced/loaders/ajax-loader.gif" data-src="'.$filename.'" data-srcset="'.$filename.' 1x, '.str_replace('.', '@2x.', $filename).' 2x"'.$extra_attribute.$extra_styling.' />';
} else {
$item->imagetag = '<img alt="'.$item->title.'" class="lazyload" data-src="'.$filename.'" data-srcset="'.$filename.' 1x, '.str_replace('.', '@2x.', $filename).' 2x"'.$extra_attribute.$extra_styling.' />';
}

Class 'lazyload' adds in both cases =)

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #5061 by syw
Replied by syw on topic Some questions and requests
Great catch! Thank you very much for the report.
Until I release a fix, you can switch the URL path to
/media/syw/images/ajax-loader.gif

Olivier.

Please Log in or Create an account to join the conversation.

  • Сергей_Матюнин
  • Сергей_Матюнин's Avatar Topic Author
  • Offline
More
6 years 3 months ago #5062 by Сергей_Матюнин
Replied by Сергей_Матюнин on topic Some questions and requests

syw wrote: Great catch! Thank you very much for the report.
Until I release a fix, you can switch the URL path to
/media/syw/images/ajax-loader.gif

I think that 'data/image:....' is better: less requests to server.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #5063 by syw
Replied by syw on topic Some questions and requests
The lazyload script is used for lazy loading AND switching to high resolution images. Therefore having the class="lazyload" in both theses cases is not a bug, it is intended this way.

Olivier.

Please Log in or Create an account to join the conversation.

More
6 years 3 months ago #5064 by syw
Replied by syw on topic Some questions and requests
I disagree for the data:...
It would add tons of lines of code to your page because it would add data:... to every single image. Therefore slowing the page down.
I also intend to allow users to choose the loader image in a future release. Using an image one uses 1 request to get the image. Once loaded and in the browser cache, the image is not requested anymore.

Olivier.

Please Log in or Create an account to join the conversation.