Lazy Load

 
What it does

When a large display of e.g. many thumbnails or many images in a filmstrip are potentially visible, only the ones that are actually inside the viewport c.q. browser window will be loaded from the server. As soon as other images become inside the viewport e.g. by scrolling, the images will be loaded from the server. This speeds up building up the initial display of the page.

How to activate

Select one of the options not being off in Advanced settings -> System -> I -> Item 23: Lazy load

How it is implemented

The way this is achieved is as smart as simple: On building up the page content, wppa <img> tags do not contain the src="..." attribute, but the data-src="..." attribute containing the images url.
On the events DOMContentLoaded, resize, scroll, orientationchange and a few others, the function wppaMakeLazyVisible() is called that replaces the attribute data-src by src with the same url for those images that became (partially) 'in sight'.
This immediately causes the images to be loaded. The data-src attribute is removed, so the check and creation of the src attribute happens only once for each lazy load image.

Example

[wppa type="thumbs" album="205" size="300" align="center"]

Docs by subjectβ€’Advanced topicsβ€’Optimizationβ€’Lazy Loadβ€’Fractalsβ€’Fractals
  
Average rating  1 2 3 4 5f
My rating d12345
3747
3748
3749
3750
3751
3752
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3727
3728
3729
3730
3731
3732