Skip to content

Conversation

indykoning
Copy link
Member

We do not need the bounds because ResizeObserver passes devicePixelContentBoxSize along with the bounds, WITH dpi factored in!

Previously the eager loaded images are render blocking when downloading the new image:
image

Now by setting loading to lazy before, pushes those downloads to the background:
image

So your onload is much quicker.

Currently as draft, as in my current testing scenario i get a flash of white on my images while they load (Not impacting pagespeed might i add)

@BobWez98 BobWez98 marked this pull request as ready for review November 12, 2024 06:45
BobWez98
BobWez98 previously approved these changes Nov 21, 2024
@indykoning
Copy link
Member Author

The flash of white unfortunately seems impossible using conventional means. using the placeholder as background image ensures you don't notice the flash

@BobWez98 BobWez98 merged commit 8dd42bd into justbetter:master Nov 21, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants