Current state of this repo
What is the current state of this repo? No new release since over 4 years. Are people still using this are are you guys implementing your own logic?
Still using it in production here, and working fine (using only to lazyload some javascript execution, not images), but I wonder the same about if there are updated ways now.
@pboisso good to know! I just want to use it for images, but I think I can easily do this with native lazy loading, classes and some maybe a js intersectionObserver. Not fully sure tho, but I try to figure out the real benefits of this repo for images only
Its all about the data-sizes="auto" attribute:
Benefit of lazysizes is when you don't know the exact dimensions which each and every image will cover in the viewport.
This is especially true for CMS based websites where editors can select the image width using some grid-system, nested containers and different container rendering based on viewport-width.
As long as there is no browser native option for all browsers, I'll stay with lazysizes.
<img sizes="auto" loading="lazy" width="…" height="…" …> is implemented in Chromium only:
- https://caniuse.com/mdn-html_elements_img_sizes_auto
- https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes#browser_compatibility
- https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#auto_3
- https://github.com/whatwg/html/pull/8008
- https://github.com/whatwg/html/issues/9448
Older discussions:
- https://github.com/whatwg/html/issues/4654#issuecomment-495266624
- https://github.com/whatwg/html/issues/8007
- https://github.com/whatwg/html/issues/10182
Any specific reason why development stopped? for years?
From what I see in the commits this is a one person work type of repo (@aFarkas). So the person could be fed up maintaining it, have some higher personal priorities, you name it. That's the beauty of open source projects with few contributors that the whole internet is built on. (thanks for the hard work and I hope you are well and safe @aFarkas)