-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Lazy loading images #355
Lazy loading images #355
Conversation
…use loading='lazy' for all images.
…es inside figures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested removing lazy-loading from images that will mostly be above the fold.
Didn't see this ticket, but I also added lazyload on the files in here:
Let me know what works better (and I will remove). |
Well as per above conversation, I think your version is overly aggressive and prefer to be selective on which images are lazy-loaded for reasons discussed above. Does anyone know if it's bad to over use lazy-loading or not? Raised this query to ask Google for clarification: GoogleChrome/web.dev#1850 |
We could use eager for the hero images as described in the documentation of native lazy loading. |
Changed my review above to do that! |
Co-Authored-By: Barry Pollard <[email protected]>
Co-Authored-By: Barry Pollard <[email protected]>
Co-Authored-By: Barry Pollard <[email protected]>
Co-Authored-By: Barry Pollard <[email protected]>
Getting |
Hi @rviscomi, I'm not sure why that would be, I didn't think we were using anything esoteric. Could it be the This functionality seems to be causing quite a few problems, perhaps we shouldn't be doing this right now? We can abandon this PR if you think that would be better. |
Works for me with node v12.13.0
What's the problem with this functionality (other than this)? You're not getting it confused with the timestamp functionality are you? |
Hmmm ok. If it works for everyone else it must be me. @mikegeyser could you resolve the merge conflicts and then we can ship this? |
Isn't it kind of important for you to be able to build chapters? Did you try removing the |
Here's the full error:
I'm using node v8.7.0. I've updated to v12.13.0 and now the script runs but generates errors having to do with the HTML, for example:
Note the weird stray |
That explains it! Apparently you have to use the
Or upgrade to a decent version of node and stop living in the past 😀 |
Can we perhaps park this change for the moment? I don’t feel entirely comfortable with the PR, it feels like something isn’t quite right. It’s not actually essential for the release, but could risk destabilization of the generation script over the weekend. I honestly feel like the most responsible thing to do would be to revisit it next week, with fresh eyes, when the rush is off. |
@mikegeyser +1 |
I can't repeat this on this branch. |
Closes #351.
Changed the generated script, as well as all of the static pages, to use loading='lazy' for all images. I hope I wasn't too heavy handed with the
loading="lazy"
, but it seems reasonable to me and doesn't affect the experience of the site in any way.