For example, wouldn't it be amazing if such a thing as <img src="..." lazy="500px"> were possible such that the browser would load the image if its bounds were visible in the viewport or within 500px of the scroll position?
<img src="..." lazy="500px">
I cannot find where it is written, I might have saw it in one of their video: the Chrome team is working (I think it was a talk with Addy Osmani in which I heard this, correct me if I am wrong) is actually working/thinking of a lazy="true" attribute on img video and audio to help make this a de facto feature on the web. So maybe they heard your request 😉
It's changed a little since then but yes there is a built in lazyload in the pipeline 😀
This is a draft of spec changes to support a lazyload attribute in iframe and img elements.
/embedded-content.html ( diff )
/iframe-embed-object.html ( diff )
/images.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/urls-and-fetching.html ( diff )
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.