Site logo

Archived topic

Lazy loading tips for GeneratePress?

7 replies · Started by Henry on November 4, 2020

Viewing posts 1–8 of 8

I have to build a page that will have about 50 images, needless to say, I'd prefer some way to make the images load as the page is scrolled down.

Any tips, advice - plugin - on how to do this?

Thanks

Hi there,

are you using Autoptimize on your site? as it has Lazy loading options in it settings.
You will also find may of the other cache/optimization plugins eg. WP Rocket provide this.

Thanks David.

Interestingly though, I note that if I view the source code there is a class called "lazy"

<img loading="lazy" width="300" height="169" src="/ etc etc ></figure>

What is this img class "lazy"?

Thanks

In WP 5.5 they introduced native browser lazy loading. Which is great but not all browsers support eg. Safari and IE. More info on that here:

https://web.dev/browser-level-image-lazy-loading/

If you know your user base is 99% Chrome - then you can just let WP and the browser do its thing. If you want wider browser compatibility then you will need to use a lazy loader plugin.

Thanks, David - that's great news; and great knowledge you have! Appreciate it.

You're welcome!

This archived topic is closed to new replies.