Avatar

Lazy loading for images in entries? (Features)

by Auge ⌂, Wednesday, May 18, 2022, 13:58 (38 days ago)

Hello

Every when and then I try to sweep my browser bookmarks. So I came across an article about lazy loading, a technique to defer the loading of website content to the moment it is actually needed. For My Little Forum the loading of images in entries comes into my mind. Here, in the project forum, it is no issue at all. But it is possible, that the use of images is a serious issue in other instances.

Beside several JS libraries native browser support is available for most of the browsers. We would only need to add the attribute `loading="lazy"` to some or all of the image elements that gets created in the function do_bbcode_img.

Any thoughts, pros or cons?

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Tags:
lazy loading, images, performance, traffic


Complete thread:

 RSS Feed of thread