Topic List Previews: Add Lazy Loading to Topic List Previews


Add Lazy Loading to Topic List Previews


Lazy Loading would be useful in TLP as it is already part of core and would save on loading a bunch of images if not necessary.

Use Case

My instance has a lot of images which load using TLP. If lazy loading was used, only images within the viewport would be loaded, saving on bandwidth and performance.


1 Like

This is done on on both the Plugin and the new Theme Component solution. It works better on the latter because of the way the tiles are loaded.


I removed this from the Plugin as was causing problems with corruption of layout on Firefox.

Turns out, because Masonry renders the images at the top left and then animates the tile across the screen, I don’t think lazy loading is useful as the new topics always pass almost immediately across the screen.

On the new TC, however, which doesn’t use Masonry, the new topics are rendered below, off screen and there is a watch on scroll that rebuilds the layout so it makes much more sense.

1 Like

Thanks @merefield - will have a look soon!

1 Like