Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eagerly load the first N images #3

Closed
verlok opened this issue May 16, 2019 · 3 comments
Closed

Eagerly load the first N images #3

verlok opened this issue May 16, 2019 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@verlok
Copy link

verlok commented May 16, 2019

Hey there,

I strongly suggest to add the loading=lazy attribute only after the Nth image.

The reason of that is when browsers will parse the page and find the loading=lazy images, they will delay images download to a second stage, making rendering performance worse for the first images in the page, which we want to be rendered ASAP.

The first images in the page should have the loading=eager attribute or no loading attribute at all (which defaults to loading=auto).

The N number could be specified in the settings, or it could initially be set to an arbitrary number, e.g. 10.

Thanks for mentioning me and my article in the tweet.

@jdmdigital jdmdigital added the enhancement New feature or request label May 16, 2019
@jdmdigital jdmdigital self-assigned this May 16, 2019
@jdmdigital
Copy link
Owner

That's a great suggestion @verlok. I can't help but wonder if it does, in fact, make sense to postpone the rendering of images, even if they are above the fold, until a second pass. We see this done all the time on sites like Medium where images in the body of the article are lazy-loaded, even the very first image at the top of the page (well-above the fold).

I like the idea of making it a setting. Might create a super-simple settings page for the plugin and allow the website admin to make this determination for themselves.

@verlok
Copy link
Author

verlok commented May 17, 2019

Good idea. Go ahead!

jdmdigital added a commit that referenced this issue May 17, 2019
Add settings page which closes issues #1 and #3.
@jdmdigital
Copy link
Owner

Thanks for your input. We've added a new settings page in our latest commit... 113bfc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants