I think conceivably if there is an image you know you want showing up ASAP, you'd want to set loading="eager" on those ones..... But for the most part, the lazy images already above the fold will be loading more or less instantly.
All else equal, lazy is the way to go, but if we see that some images are being wrongly deferred, we could instruct the browser otherwise.
Then I kinda wonder why loading="lazy" isn't the default behavior for browsers (those that support it). It sounds like it's the way to go in 99% of the cases. And for the rest of the cases, you set loading="eager" or whatever is appropriate to overwrite default behavior.
it is costly for browsers to calculate the current position of each image and cross-reference the scrollbar data, in addition to doing such a thing they would break various image-based tracker mechanisms
I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin.
Back in the day, I had a geekcode which I'm not going to share with you.
418 I'm a teapot.
possibly that's the reason that many here have avoided Medium to use the dev.to which appears to be much faster and stable precisely by avoiding lazy load.
intinite load is a valid choice, but lazy load is a lazy dev thing 😆
I don't know how Medium's lazy load is implemented, but I hate it. Most times, the images remain permanently stuck loading. Seen this on a few other sites too. IMO, it's unnecessary.
I'm on a slow-ish connection, but I prefer just having the images load at once, so I know I can use the entire page. Lazy loading to me seems like one of those cool optimisations with debatable impact in the real world.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think conceivably if there is an image you know you want showing up ASAP, you'd want to set
loading="eager"
on those ones..... But for the most part, the lazy images already above the fold will be loading more or less instantly.All else equal, lazy is the way to go, but if we see that some images are being wrongly deferred, we could instruct the browser otherwise.
Then I kinda wonder why
loading="lazy"
isn't the default behavior for browsers (those that support it). It sounds like it's the way to go in 99% of the cases. And for the rest of the cases, you setloading="eager"
or whatever is appropriate to overwrite default behavior.it is costly for browsers to calculate the current position of each image and cross-reference the scrollbar data, in addition to doing such a thing they would break various image-based tracker mechanisms
That second part sounds like a net win to me.
you're right @ben , lazy load sucks.
possibly that's the reason that many here have avoided Medium to use the dev.to which appears to be much faster and stable precisely by avoiding lazy load.
intinite load is a valid choice, but lazy load is a lazy dev thing 😆
I don't know how Medium's lazy load is implemented, but I hate it. Most times, the images remain permanently stuck loading. Seen this on a few other sites too. IMO, it's unnecessary.
I'm on a slow-ish connection, but I prefer just having the images load at once, so I know I can use the entire page. Lazy loading to me seems like one of those cool optimisations with debatable impact in the real world.