All Projects → mazipan → vue-tiny-lazyload-img

mazipan / vue-tiny-lazyload-img

Licence: MIT license
🐌 A small size Vue.js directive for lazy loading images using IntersectionObserver API

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
EJS
674 projects

Projects that are alternatives of or similar to vue-tiny-lazyload-img

vue-lazy-load-img
vue版本的lazy-load-img图片懒加载插件
Stars: ✭ 31 (-65.93%)
Mutual labels:  vue2, lazy-load-img
lazy-load-images.js
Progressive & lazy loading images.
Stars: ✭ 17 (-81.32%)
Mutual labels:  lazy-loading, lazy-load-img
Vue Lazyload Images
A plugin of lazy-load images for Vue2.x
Stars: ✭ 61 (-32.97%)
Mutual labels:  vue2, lazy-loading
jekyll-loading-lazy
🧙🏽‍♀️ Automatically adds loading="lazy" to <img> and <iframe> tags. Load images on your sites lazily without JavaScript.
Stars: ✭ 41 (-54.95%)
Mutual labels:  lazy-loading, lazy-load-img
vue2-loading
vue-loading presented in Vue2
Stars: ✭ 15 (-83.52%)
Mutual labels:  vue2
firefly
Firefly is a mobile wallet for Stellar ecosystem
Stars: ✭ 54 (-40.66%)
Mutual labels:  vue2
vue-code-view
A Vue 2 component like Vue SFC REPL `@vue/repl` : u can edit, run and preview the code effect display in real time on the web page.
Stars: ✭ 67 (-26.37%)
Mutual labels:  vue2
element-ui-demo
A element-ui admin base on vue2
Stars: ✭ 18 (-80.22%)
Mutual labels:  vue2
security-code
A powerful security code input supports dynamic configuration of the number of input boxes.
Stars: ✭ 63 (-30.77%)
Mutual labels:  vue2
vue-editable
In-place editing for Vue.js 2.
Stars: ✭ 16 (-82.42%)
Mutual labels:  vue2
fast-relay-pagination
Improve relay pagination performance with find and limit
Stars: ✭ 18 (-80.22%)
Mutual labels:  lazy-loading
vue-ckeditor
✏️ Vue2.0 Ckeditor component.
Stars: ✭ 17 (-81.32%)
Mutual labels:  vue2
glue
Glue是一个基于web component构建的组件库,可以在react,vue2,vue3,angular和html等前端框架中运行
Stars: ✭ 63 (-30.77%)
Mutual labels:  vue2
lazy-image
Lazily load your images with <lazy-image> custom element
Stars: ✭ 42 (-53.85%)
Mutual labels:  lazy-loading
ableton-live-downloader
🎹 Downloads the desired 64-bit installer from any version of Ableton Live 11, 10, and 9.
Stars: ✭ 17 (-81.32%)
Mutual labels:  vue2
vue-split-carousel
a carousel component for vue, meanwhile display several carousel item
Stars: ✭ 37 (-59.34%)
Mutual labels:  vue2
lazyImages
基于ES6的轻量级,高性能,简便的图片懒加载 🐈
Stars: ✭ 43 (-52.75%)
Mutual labels:  lazy-loading
vue-methods-promise
Let Vue methods support return Promise
Stars: ✭ 35 (-61.54%)
Mutual labels:  vue2
vue-music
基于Laravel5.3+Vue2.0的网易云音乐的SPA应用
Stars: ✭ 85 (-6.59%)
Mutual labels:  vue2
mobile
Go语言中文网移动端版本,使用 Vue.js(2.x) 构建
Stars: ✭ 35 (-61.54%)
Mutual labels:  vue2

🐌 vue-tiny-lazyload-img

A small size Vue.js directive for lazy loading images using IntersectionObserver API

Travis License version downloads minified

Demo Page

https://mazipan.github.io/vue-tiny-lazyload-img/

Usage

Download

npm install vue-tiny-lazyload-img
// OR
yarn add intersection-observer

Install Plugin

import VueTinyLazyloadImg from 'vue-tiny-lazyload-img'
Vue.use(VueTinyLazyloadImg);

HTML Snippet

<img v-lazyload
  src="./assets/logo.png"
  data-src="./assets/logo-success.png"
  data-err="./assets/logo-error.png">

Please Use polyfill

This plugin using IntersectionObserver, so please use polyfill if you need support old browser

$ yarn add intersection-observer

// then add polyfill for IntersectionObserver in your main app
require('intersection-observer')
  • The easiest way to load the IntersectionObserver polyfill and have it work in the widest range of browsers is via polyfill.io, which will automatically include dependencies where necessary:
<script src="https://polyfill.io/v2/polyfill.min.js?features=IntersectionObserver"></script>

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production demo with minification
npm run build:demo

# build for plugin distribution file
npm run build:lib

Credit

Based on this awesome article: https://developers.google.com/web/fundamentals/performance/lazy-loading-guidance/images-and-video/


Copyright © 2018 Built with ❤️ by Irfan Maulana

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