[OzzModz] Lazy Load Images

[OzzModz] Lazy Load Images 1.0.3

No permission to download

Mr. Jinx

Well-known member
Mr. Jinx submitted a new resource:

Lazy Load Images (PageSpeed improvement) - Improve your PageSpeed score with Lazy Load Images

This add-on adds 'lazy loading images' to your forum.

Loading image lazy means your browser will only download images when needed.
It's one of the PageSpeed recommendations:

Defer offscreen images
Consider lazy-loading offscreen and hidden images after all critical resources have finished loading to lower time to interactive.​

Google Chrome does this in an intelligent way and decides based on desktop/mobile usage and connection speed when to load...

Read more about this resource...
 
Currently the new 'loading=lazy' tag is only added for avatars and image attachments.
Let me know if there are other images you want to be included.
You've just added the 'loading=lazy' tag, nothing else right (eg. size etc)?
You can also add it in the "_media_site_embed_youtube" template for the YouTube videos. And, the favicons that it fetches from the URLs.

Also the images that are from social networks and are embedded.
Eg.
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Last edited:
That is correct, although not only Chrome but all modern browsers like Edge and Firefox support this new tag.
For a full list check: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Browser_compatibility

Xon's add-on has more features and is also using 3rd party scripts.
I created this add-on just to add lazy loading support using native browser tags, without extra javascript and with minimal impact.
So I would say this is a 'lite' version.
 
Thanks, I've check the new template mod is working but I still can't see the lazy tag added on page source :|
Can you give an example by sharing part of the page source, which includes the complete IMG tag (and a few more lines).

I am using chevereto image support for forum images outside of the media gallery.
Does Add-on help me?
It only adjusts avatar and attachments within XF, so probably nothing will happen with the other images.
 
Top Bottom