All Projects → svelte-barcode → lazy-load-images.js

svelte-barcode / lazy-load-images.js

Licence: MIT license
Progressive & lazy loading images.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to lazy-load-images.js

jekyll-loading-lazy
🧙🏽‍♀️ Automatically adds loading="lazy" to <img> and <iframe> tags. Load images on your sites lazily without JavaScript.
Stars: ✭ 41 (+141.18%)
Mutual labels:  lazy, lazy-load, lazyload, lazy-loading, lazyloading, lazyload-images, lazy-load-img
rocket-lazy-load
Standalone LazyLoad plugin for WordPress (based on WP Rocket)
Stars: ✭ 25 (+47.06%)
Mutual labels:  lazy-load, lazyload, lazy-loading, lazyloading, lazyload-images
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 (+229.41%)
Mutual labels:  lazyload, lazy-loading, lazyloading, lazyload-images
Responsively Lazy
Lazy load responsive images
Stars: ✭ 1,080 (+6252.94%)
Mutual labels:  lazy, lazyload, lazy-loading
lazysimon
Minimal effort 350 byte JavaScript library to lazy load all <img> on your website
Stars: ✭ 18 (+5.88%)
Mutual labels:  lazyload, lazy-loading, lazyload-images
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 (+38700%)
Mutual labels:  lazyload, lazy-loading, lazyload-images
ngx-progressive-image-loader
lazy load img/picture, prevent reflow and seo friendly.
Stars: ✭ 35 (+105.88%)
Mutual labels:  lazyload, lazyload-images, progressive-image
Accessible Image Lazy Load
😴 gandul! accessible lazy loading images
Stars: ✭ 281 (+1552.94%)
Mutual labels:  lazy, lazyload, lazy-loading
lazyImages
基于ES6的轻量级,高性能,简便的图片懒加载 🐈
Stars: ✭ 43 (+152.94%)
Mutual labels:  lazy, lazy-loading, lazyload-images
Jquery.lazy
A lightweight, fast, feature-rich, powerful and highly configurable delayed content, image and background lazy loading plugin for jQuery & Zepto.
Stars: ✭ 965 (+5576.47%)
Mutual labels:  lazy, lazyload, lazy-loading
guide-to-async-components
📖 Guide To JavaScript Async Components
Stars: ✭ 79 (+364.71%)
Mutual labels:  lazyload, lazy-loading, lazyload-images
Nuxt Lazysizes
Lazysizes module for Nuxt.js
Stars: ✭ 25 (+47.06%)
Mutual labels:  lazyload, lazy-loading
Lozad.js
🔥 Highly performant, light ~1kb and configurable lazy loader in pure JS with no dependencies for responsive images, iframes and more
Stars: ✭ 6,932 (+40676.47%)
Mutual labels:  lazyload, lazy-loading
Yall.js
A fast, flexible, and small SEO-friendly lazy loader.
Stars: ✭ 1,163 (+6741.18%)
Mutual labels:  lazyload, lazy-loading
Pimg
📷 Mini Image Lazy Loader for P(R)eact and Vue
Stars: ✭ 97 (+470.59%)
Mutual labels:  lazy, lazy-loading
React Lazy Load Image Component
React Component to lazy load images and components using a HOC to track window scroll position.
Stars: ✭ 755 (+4341.18%)
Mutual labels:  lazyload, lazy-loading
React Lazy
Universal lazy loader components using IntersectionObserver for React
Stars: ✭ 118 (+594.12%)
Mutual labels:  lazyload, lazy-loading
Ng In Viewport
Allows us to check if an element is within the browsers visual viewport
Stars: ✭ 178 (+947.06%)
Mutual labels:  lazyload, lazy-loading
React Progressive Loader
Utility to load images and React components progressively, and get code splitting for free
Stars: ✭ 224 (+1217.65%)
Mutual labels:  lazyload, lazy-loading
relaze
Tiny image lazy loading library for React.
Stars: ✭ 20 (+17.65%)
Mutual labels:  lazy, lazy-loading

lazy-load-images.js

lazy-load-images

lazy-load-images.js is a javascript library that defers loading of non-critical resources at page load time. Instead, these non-critical resources are loaded at the moment of need. Where images are concerned here.

We'd love to have your helping hand on contributions to lazy-load-images.js by forking and sending a pull request!

Features

  • Fast loading
  • High performance
  • Supports all images type
  • Responsive images
  • Supports all modern browsers Chrome, Firefox, Safari, (IE10+), ... etc.

Demo

Let take a look the live lazy-load-images.js demo. And download the library here.

Installation

The page must load the CSS and JavaScript.

<link rel="stylesheet" href="css/lazy-load-images.min.css">
<script src="js/lazy-load-images.min.js"></script>

Usage

lazy-load-images.js is a link to the full-size graphic around the preview.

Note: put lazy-load and replace classes on the link. And the preview class on the image.

<a href="full-images-url.png" class="lazy replace">
  <img src="tiny-images-url.png" class="preview" alt="image" />
</a>

Preview image can be very small (20px) in width and saved with high JPEG.

Large image can be any size but should match the preview image (20x15 can be scaled to 200x150, 400x300 or 1600x1200).

Basic

<a href="full-images-url.png" 
   class="lazy-load replace">
  <img src="tiny-images-url.png" 
       class="preview" 
       alt="Cambodia Angkorwat" />
</a>

Retain the link

If you require a image to remain a link, use href as address then add a data-href attribute with the large image URL.

<a href="http://geekhmer.github.io" 
   data-href="full-images-url.png" 
   class="lazy-load replace">
  <img src="tiny-images-url.png" 
       class="preview" 
       alt="Cambodia Angkorwat" />
</a>

Responsive

Responsive images can be defined in the container link/element using the data-srcset and data-sizes attributes which map to the standard srcset and sizes attributes.

<a href="small-images-url.png" 
   data-srcset="small-images-url.png 400w,  large-images-url.png 800w, extra-large-images-url.png 1600w" 
   data-sizes="100vw"
   class="lazy-load replace">
  <img src="" 
       class="preview" 
       alt="Cambodia Angkorwat" />
</a>

Source

Click here to download the library.

Contributing

We'd love to have your helping hand on contributions to lazy-load-images.js by forking and sending a pull request!

Your contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)

License

MIT License

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].