Lazy Load [img]

XF2 ADD-ON Lazy Load [img] 2.5.1

Lazy Load [img]
Provides lazy loaded image support via the Lazysizes

A zero query method for per user-group lazy loading of the and [attach] tags in threads and conversations.

Uses a noscript tag around the original img tag.

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

[B]Permissions:[/B]

Adds the permission:
[LIST]
[*]Enable Lazy Load Images
[/LIST]
For "Forum Permissions" and "Conversation Permissions" sections.

[B]Options:[/B]
[IMG alt="1604583144578.png"]https://xenforo.com/community/attachments/1604583144578-png.239104/

  • 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'ed images
    • Ignores permissions, and lazy loads images in spoilers
  • Lazy load icons
    • Lazy load user avatars, resource icons, and threadmark icons.
      This uses browser native lazy loading.
  • Use native lazy loading
    • Requires a modern browser, otherwise falls back to js library code
  • Inject blank SVG for attachment

Unveil effects
Add styling to your theme for the classes: lazyload, lazyloading, lazyloaded. This can be done by the provided style classes

Fade in
Fade image in after load.

In; Lazy loading and Lazy loading in progress
CSS:
opacity: 0;
In Lazy loading finished add;
CSS:
opacity: 1;
transition: opacity 300ms;

Spinner
Fade image in while loading and show a spinner as background image (good for progressive images)

In; Lazy loading;
CSS:
opacity: 0;
In Lazy loading in progress;
CSS:
opacity: 1;
transition: opacity 300ms;
background: #f7f7f7 url(loader.gif) no-repeat center;

A "loader.gif" image is not provided by this add-on!

Licensing:

Lazysizes is MIT Licensed, as of 2020-06-07.
Original source is https://github.com/aFarkas/lazysizes



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

Contributions

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 licensing arrangements.

Similar resources

Inventory Saver | Save, Offline Edit, Load and Delete | MYSQL SUPPORT | COMPLETELY RECODED BlackSpigot.com
Mysql or Flatfile data saving | Lags free and easy to use. | Fully configurable | 1.8 - 1.19
0.00 star(s) 0 ratings
Downloads
29
Updated
⚡️ WildLoaders ⚡️ Load chunks without alts ⚡️ 1.16 Support! LingDong
5.00 star(s) 1 ratings
Downloads
204
Updated
30% FIRST WEEK SALE [IMG] First plugin ever to offer creation of Custom Mobs with lightweight perfo K
5x Custom 3D Mobs ✔ CREATE CUSTOM MOBS ✔ Stackable Spawners & Mobs ✔ Spawner Upgrades ✔
5.00 star(s) 1 ratings
Downloads
101
Updated
BlackSpigot General Chat
Rules Help Users
    N @ NotexTeam: -Redacted-
    Top