Lazy loading for images

Thanks for introducing the best lazy loading library or best method without jquery? I searched for a lot but I could not find the best solution

Hello @shabzadeh97 welcome to the forums.

I really don’t know what “best” means, as it is a subjective term, but if you want something that works, take a look at the thread here.

4 Likes

There’s a good article here:

I’m not sold on lazy loading images for most normal sites and it seems that simple optimisation of the images would be a better option in most cases.

I often find that lazy loaded images make scrolling the page really ‘clunky’ while waiting for the next image to load as it comes into view. On a slow connection this is like watching a video that keeps buffering. I would prefer to wait initially while the whole thing loads and then scroll up and down the page effortlessly. But that may just be me:)

5 Likes

One thing that makes lazy loading less than “best” is that it doesn’t work without JavaScript.

5 Likes

thank you

What do you mean by optimizing images?

Making the image file size no larger than it needs to be.
This is done be altering the physical size in pixels to be no larger than necessary, then saving using an appropriate compression format for the image type.

4 Likes

How can I reduce the amount of photos after uploading so that the quality of the photo does not crash؟

thank you

I find https://tinyjpg.com/ a useful tool for compressing images, but there are plenty of others, or you can use your favourite image editing software.

Also, if you use https://gtmetrix.com/ to check the speed of your site, it will create optimised images for you.

5 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.