• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lazy Load [img] 2.0.1

No permission to download
Compatible XF 2.x versions
Additional requirements
php 5.6+
Require Client Browsers to be at least IE9, Firefox or Chrome.
MIT Licence
Visible branding
Provides lazy loaded image support via the Lazysizes

A zero query method for per user-group lazy loading of the [img] and [attach] tags in threads and conversations with adjustable distance before images are loaded.

Uses a noscript tag around the original img tag.

Option to force lazy loading of contents in a spoiler tag.


Adds the permission:
  • Enable Lazy Load Images
For "Forum Permissions" and "Conversation Permissions" sections.


  • Enable Outside threads/Conversations
    • permits the lazy loading bbcode injection to run outside of those contexts. Inside those context it will still respect permissions.
  • Force Lazy Loaded Spoiler

Unveil effects
Add styling to your theme for the classes: lazyload, lazyloading, lazyloaded.

Fade in
/* fade image in after load */
.lazyloading {
    opacity: 0;
.lazyloaded {
    opacity: 1;
    transition: opacity 300ms;
/* fade image in while loading and show a spinner as background image (good for progressive images) */

.lazyload {
    opacity: 0;

.lazyloading {
    opacity: 1;
    transition: opacity 300ms;
    background: #f7f7f7 url(loader.gif) no-repeat center;
Known issues:
  • Doesn't work with XenForo Resource Manager.
  • Doesn't work with XenForo Media Gallery.


Lazysizes is MIT Licensed, as of 2018-01-10.
Original source is https://github.com/aFarkas/lazysizes

Contributing features or bug fixes
Please create a Github Pull request via the "More Information" link.


If you appreciate this addon, please consider a contribution via PayPal. Details will be provide via private conversation.

Please contact me if you wish for different licencing arrangements.
First release
Last update
5.00 star(s) 4 ratings

More resources from Xon

Latest updates

  1. 2.0.1 - Maintenance update

    Add "Inject blank SVG for attachment" option (default enabled) to control if the inline SVG is...

Latest reviews

Works exactly as you expect it to, painless install. Just update usergroup permissions to allow lazy loading and you're done. Helped out with pagespeed scores, especially useful on mobile
Very good addon to reduce server load when loading a bunch of attachements. Works as intended, thanks ! :)
What else to say except another Xon's superb addon. Integration without errors, work without errors and if any question you have, Xon has time to answer on it.
Very useful add-on! its help me to make my site load faster, thank you @xon for porting this addon to XF 2.0.