lazy load images with intersection observer
See the demo and usage instructions @ https://cdowdy.github.io/io-lazyload/
See the post this was derived from: https://corydowdy.com/blog/lazy-loading-images-with-intersection-observer
A javascript library to lazy load images with intersection observer
Home Page: https://cdowdy.github.io/io-lazyload/
License: MIT License
lazy load images with intersection observer
See the demo and usage instructions @ https://cdowdy.github.io/io-lazyload/
See the post this was derived from: https://corydowdy.com/blog/lazy-loading-images-with-intersection-observer
Hi
Can you please publish your code as npm package?
Thanks
When using IOlazy with IntersectionObserver
Polyfill in Safari 11 the Polyfill’s _parseRootMargin
method crashes with a TypeError e.split is not a function. (In 'e.split(/\s+/)', 'e.split' is undefined)
.
This is caused by IOlazy passing rootMargin
as Array which can not work with the polyfill.
Please update IOlazy class to pass rootMargin
as String which is – as far as I can tell – expected in the spec, too.
Possibly using some other data tag like data-bg?
That happens when you have container (i.e. read more) that unveils content on click.
Right now - image would be loaded. Even though it's not visible due to being hidden within parent.
Sample code:
<div class="show_more"><a class="show-more"> Read more …</a> -> clicking makes next div visible
<div class="content-hide">
// image here
</div></div>
Firstly, thanks for taking the time to develop and share.
I am attempting to implement io-lazyload on a WordPress site. I can see that images are only downloaded by the browser as they come into view (as expected), however the image displayed to the user does not ever change from the low-res placeholder (in this case, an SVG).
Test URL available @ https://redacted
Cheers
some super old things here need updated. Mainly gulp and babel
I used dataset
https://github.com/cdowdy/io-lazyload/blob/master/src/js/iolazy.js#L48-L54
and this will choke in IE 10.. so.. do i use getAttribute or just leave it since they are no longer supported by Microsoft.. hmm
https://www.microsoft.com/en-us/windowsforbusiness/end-of-ie-support
or should I just make a mention of it in the demo page/readme?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.