-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Improve image loading behaviors #4295
Improve image loading behaviors #4295
Conversation
…ing animation that doesn't wait for all images. Progressive enhanced
await Promise.all( | ||
supporters.sponsors.map(async sponsor => { | ||
for await (const chunk of needle.get(sponsor.avatar)) { | ||
sponsor.dimensions = imageSize(chunk); |
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.
nice. yeah, they come down with a fixed height, but we don't know the width.
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.
Yup. HAving the width makes all the difference for being able to have the browser finalize the height of the section because it knows what space to reserve
</ul> | ||
|
||
<script> | ||
(function() { |
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.
I assume this still gets squashed in production.
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.
Actually I'll just need to check up on the bundling there. I'd want this one to actually stay in place and inlined, which gives us the least amount of lag time between rendering the things it works on and initiating the effect it creates
feel free to push again to my branch |
rather, directly, no need to PR |
I looked through what we are doing with loading opencollective avatars and found some improvements.