All Projects → Paul-Browne → Lazyestload.js

Paul-Browne / Lazyestload.js

Licence: mit
load images only when they are in (and remain in) the viewport

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Lazyestload.js

demos
Collection of demos used in articles on justmarkup.com
Stars: ✭ 87 (-94.02%)
Mutual labels:  progressive-enhancement
universal-progressive-todos
A Todo list with universal JavaScript & Progressive Enhancement
Stars: ✭ 30 (-97.94%)
Mutual labels:  progressive-enhancement
magento2-catalog-lazy-load
Improve the load time of your Magento 2 categories pages by loading your images on demand with our Lazy Load Extension
Stars: ✭ 56 (-96.15%)
Mutual labels:  lazyload-images
rocket-lazy-load
Standalone LazyLoad plugin for WordPress (based on WP Rocket)
Stars: ✭ 25 (-98.28%)
Mutual labels:  lazyload-images
lazysimon
Minimal effort 350 byte JavaScript library to lazy load all <img> on your website
Stars: ✭ 18 (-98.76%)
Mutual labels:  lazyload-images
jekyll-loading-lazy
🧙🏽‍♀️ Automatically adds loading="lazy" to <img> and <iframe> tags. Load images on your sites lazily without JavaScript.
Stars: ✭ 41 (-97.18%)
Mutual labels:  lazyload-images
Web-Map-Custom-Element
A custom <mapml-viewer> and <layer-> element suite
Stars: ✭ 49 (-96.63%)
Mutual labels:  progressive-enhancement
chaarts
Charts with HTML & CSS
Stars: ✭ 79 (-94.57%)
Mutual labels:  progressive-enhancement
lazyload-vue
Vue Plugin for vanilla-lazyload
Stars: ✭ 29 (-98.01%)
Mutual labels:  lazyload-images
vue-waterfall-plugin
vue 瀑布流插件,支持 PC 和移动端,支持 animate 的所有动画效果,支持图片懒加载
Stars: ✭ 119 (-91.82%)
Mutual labels:  lazyload-images
raf-pool
requestAnimationFrame pool to avoid busyness on the thread
Stars: ✭ 16 (-98.9%)
Mutual labels:  lazyload-images
v-img
📸Use webp and lazyload images
Stars: ✭ 48 (-96.7%)
Mutual labels:  lazyload-images
eureka
HTML-first crack at a Flexible Media Browser progressively enhanced with React
Stars: ✭ 18 (-98.76%)
Mutual labels:  progressive-enhancement
lazy-load-images.js
Progressive & lazy loading images.
Stars: ✭ 17 (-98.83%)
Mutual labels:  lazyload-images
ngx-progressive-image-loader
lazy load img/picture, prevent reflow and seo friendly.
Stars: ✭ 35 (-97.59%)
Mutual labels:  lazyload-images
guide-to-async-components
📖 Guide To JavaScript Async Components
Stars: ✭ 79 (-94.57%)
Mutual labels:  lazyload-images
detect-gpu
Classifies GPUs based on their 3D rendering benchmark score allowing the developer to provide sensible default settings for graphically intensive applications.
Stars: ✭ 749 (-48.52%)
Mutual labels:  progressive-enhancement
Vanilla Lazyload
LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.
Stars: ✭ 6,596 (+353.33%)
Mutual labels:  lazyload-images
FlipED
A LMS built specifically for Thailand's Education 4.0 system.
Stars: ✭ 24 (-98.35%)
Mutual labels:  progressive-enhancement
lazyImages
基于ES6的轻量级,高性能,简便的图片懒加载 🐈
Stars: ✭ 43 (-97.04%)
Mutual labels:  lazyload-images

image

load images only when they are in (and remain in) the viewport.

in only about 400 bytes of javascript 😱

  <img class="lazyestload" src="images/placeholder/sunset.jpg" data-src="images/sunset.jpg" >
  
  <script src="js/lazyestload.min.js"></script>
</body>

or with data-srcset

  <img class="lazyestload" src="images/placeholder/sunset.jpg" data-srcset="images/sunset-1x.jpg 1x, images/sunset-2x.jpg 2x, images/sunset-3x.jpg 3x" >
  <img class="lazyestload" src="images/placeholder/sunset.jpg" data-srcset="images/sunset-400.jpg 400w, images/sunset.jpg 1600w" >

or with picture and source

  <picture>
  	<source media="(max-width: 400px)" data-srcset="images/sunset-400.jpg" >
  	<source media="(max-width: 401px)" data-srcset="images/sunset.jpg" >
  	<img class="lazyestload" src="images/placeholder/sunset.jpg" >
  </picture>

demo lazyestload load images only when they are in the viewport (or within 100px) and when the user has stopped scrolling (meaning the user can scroll past images and they wont be loaded)

demo lazyload load images only when they are in the viewport or 100px beneath

When using placeholders the image should be less than 1kb, ~40px wide, and should have the same aspect ratio as the image that will replace it. (to avoid any layout jank) Also the "blur up" affect in the first demo works by adding the following css.

img {
    transition: filter 0.3s;
}

img.lazyestload {                
    width: 100%;
    filter: blur(8px);
}

I've added a placeholder generator. To use run npm i and then npm build you can also serve the demo locally with npm bsw (build, serve, watch)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].