Advertisement:

Navigation

SMF Mod Site

Mod Name:
Lazyload
Created By:
alexetgus
Type:
New Feature
First Created:
April 22, 2020, 09:39:42 AM
Last Modified:
September 19, 2020, 07:04:52 AM
Latest Version:
1.0
Compatible With:
2.0.17
Total Downloads:
205

Download this mod

lazyload-1.0.zip (18kB) [204]
Manual Install Instructions for SMF

Description:

Lazyload

Lazy loading (Lazyloading) for images displayed in SMF messages.
This mod is compatible responsive design.



Description:

This modification (for SMF 2.0.x only) adds a feature allowing posts images to be loaded only when they are needed.
If an image is not in the display window, it is not loaded.
The display of a page thus becomes faster.

This feature is essential for mobile phones that are charged by the amount of data they consume.



Information for coders:

If you want to add images lazyloading to your forum directly into the PHP code, load the javascript ./Themes/default/scripts/lazysizes.min.js, if you haven't already done so, and display your image like this:

Code: [Select]
<img data-src="my-image.png" class="lazyload" />

For more information on the JavaScript used, please visit the project's Github repository :
https://github.com/aFarkas/lazysizes


https://chez-oim.org  -  This mod is copylefted
To contribute : https://github.com/alexetgus/lazyload