All Projects → wormsan → Vue Lazyload Img

wormsan / Vue Lazyload Img

Licence: mit
A plugin of vue for image lazyload(vue图片懒加载插件)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Lazyload Img

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 (+2672.8%)
Mutual labels:  lazyload
Androidxlazyload
😈😈Fragment lazy loading under the androix
Stars: ✭ 110 (-56%)
Mutual labels:  lazyload
Lazy Progressive Enhancement
A lazy image loader designed to enforce progressive enhancement and valid HTML.
Stars: ✭ 188 (-24.8%)
Mutual labels:  lazyload
Vue Lazy Component
🐌 Vue.js 2.x 组件级懒加载方案-Vue.js 2.x component level lazy loading solution
Stars: ✭ 915 (+266%)
Mutual labels:  lazyload
Yall.js
A fast, flexible, and small SEO-friendly lazy loader.
Stars: ✭ 1,163 (+365.2%)
Mutual labels:  lazyload
Defer.js
🥇 A super small, super efficient library that helps you lazy load everything like images, video, audio, iframe as well as stylesheets, and JavaScript.
Stars: ✭ 138 (-44.8%)
Mutual labels:  lazyload
Nuxt Lazysizes
Lazysizes module for Nuxt.js
Stars: ✭ 25 (-90%)
Mutual labels:  lazyload
React Progressive Loader
Utility to load images and React components progressively, and get code splitting for free
Stars: ✭ 224 (-10.4%)
Mutual labels:  lazyload
Lazyload
Lazyload images or lazy execute scripts. (图片脚本懒加载)
Stars: ✭ 87 (-65.2%)
Mutual labels:  lazyload
React In Viewport
Detect if React component is in viewport
Stars: ✭ 183 (-26.8%)
Mutual labels:  lazyload
Zsh Lazyload
zsh plugin for lazy load commands and speed up start up time of zsh
Stars: ✭ 33 (-86.8%)
Mutual labels:  lazyload
Responsively Lazy
Lazy load responsive images
Stars: ✭ 1,080 (+332%)
Mutual labels:  lazyload
Douban Movie
🎥The douban-movie Application built with webpack + vue + vuex + vue-router + iView.
Stars: ✭ 147 (-41.2%)
Mutual labels:  lazyload
Ng Lazy Load
Lazy loading images with Angular.
Stars: ✭ 12 (-95.2%)
Mutual labels:  lazyload
Taro Listview
taro框架长列表方案 :集成下拉刷新、骨架屏、无限滚动、图片懒加载;
Stars: ✭ 197 (-21.2%)
Mutual labels:  lazyload
Mediawiki Lazyload
An extension to delay loading of images on MediaWiki pages.
Stars: ✭ 8 (-96.8%)
Mutual labels:  lazyload
React Lazy
Universal lazy loader components using IntersectionObserver for React
Stars: ✭ 118 (-52.8%)
Mutual labels:  lazyload
Oclazyload
Lazy load modules & components in AngularJS
Stars: ✭ 2,661 (+964.4%)
Mutual labels:  lazyload
Lazyload Image
HTMLImageElement extension for lazy loading.
Stars: ✭ 208 (-16.8%)
Mutual labels:  lazyload
Ng In Viewport
Allows us to check if an element is within the browsers visual viewport
Stars: ✭ 178 (-28.8%)
Mutual labels:  lazyload

中文文档看这里

Update v2.1.0

  • Add requestAnimationFrame polyfill.
  • Now img lazyload detects horizontal direction automatically
  • Imporve perfomence, since the scroll event liseners were as many as pictures * 2 before, there is only two liseners now.

Update v2.1.1

  • Add .npmignore to exclude .babelrc

Update in V2.1.2

  • Preload, let you set a range to preload images before an image enters the viewport.
  • Rewrite with Typescript, add d.ts, make developing easier.

Update in V2.1.3

  • fix wrong export of typings

Next

  • Support partial-match image URLs, eg. pic.400px.jpg or pic.200px.jpg, let you switch resolution of images by some custom rules.
  • Maybe SSR.

English doc

Finally Available on vue2, if you use v1, use npm install [email protected]

vue-lazyload-img

intro

   a plugin of vue for image lazyload, especially optimized for mobile browser

demo

Use mobile mode if possible

var with script tag

bundle with webpack

API

init

Vue.use(Lazyload[,options])

options

global options

fade: all images will use fadein fx

  • true: all images will fadein if lazyload Complete
  • false (default): no fadein fx of all

speed: threshold of loading lazyload iamge

  • 0 : load lazy-image when the image is visible at the 1st time
  • 0 (defult 0): average changes of document y-pos and any scroller's x-pos from last 10 frames

time: duration of fade in or fade out

  • 300 (default, unit: ms)

preload: set a range(vertical) to preload images before an image enters the viewport.

  • 0 (default, unit: px)
Vue.use(Lazyload,{
    // default false, recommand true
    fade: true,
    // it's better not set the speed now (because cellphones perfomance is better)
    // this option make images show slower
    // but if you open it, it does save network traffic data
    // speed: 20,
    // default 300, mostly, it's not necessary to set it
    time: 300,
    // unit:px, default 0, it allows the lazyload manager loads images(vertical) before an image appeard in screen
    preload: 500,
})

directive

v-lazyload

  • v-lazyload="src"

How to import?

In CommonJs

1st

npm install vue-lazyload-img

2nd

es6

import Lazyload from "vue-lazyload-img"
Vue.use(Lazyload)

es5

var Lazyload = require("vue-lazyload-img")
Vue.use(Lazyload)

in this way, you'll need babel or something like it

In browser

because this plugins supports umd, so you can use it as a <script> or with JS module loader like require.js.

the released bundle is in:

dist/vue.lazyimg.min.js dist/vue.lazyimg.js

中文文档看这里

Update v2.1.0

  • Add requestAnimationFrame polyfill.
  • Now img lazyload detects horizontal direction automatically
  • Imporve perfomence, since the scroll event liseners were as many as pictures * 2 before, there is only two liseners now.

Update v2.1.1

  • Add .npmignore to exclude .babelrc

Update in V2.1.2

  • Preload, let you set a range to preload images before an image enters the viewport.
  • Rewrite with Typescript, add d.ts, make developing easier.

Next

  • Support partial-match image URLs, eg. pic.400px.jpg or pic.200px.jpg, let you switch resolution of images by some custom rules.
  • Maybe SSR.

English doc

Finally Available on vue2, if you use v1, use npm install [email protected]

vue-lazyload-img

intro

   a plugin of vue for image lazyload, especially optimized for mobile browser

demo

Use mobile mode if possible

var with script tag

bundle with webpack

API

init

Vue.use(Lazyload[,options])

options

global options

fade: all images will use fadein fx

  • true: all images will fadein if lazyload Complete
  • false (default): no fadein fx of all

speed: threshold of loading lazyload iamge

  • 0 : load lazy-image when the image is visible at the 1st time
  • bigger than 0 (defult 0): average changes of document y-pos and any scroller's x-pos from last 10 frames

time: duration of fade in or fade out

  • 300 (default, unit: ms)

preload: set a range(vertical) to preload images before an image enters the viewport.

  • 0 (default, unit: px)
Vue.use(Lazyload,{
    // default false, recommand true
    fade: true,
    // it's better not set the speed now (because cellphones perfomance is better)
    // this option make images show slower
    // but if you open it, it does save network traffic data
    // speed: 20,
    // default 300, mostly, it's not necessary to set it
    time: 300,
    // unit:px, default 0, it allows the lazyload manager loads images(vertical) before an image appeard in screen
    preload: 500,
})

directive

v-lazyload

  • v-lazyload="src"

How to import?

In CommonJs

1st

npm install vue-lazyload-img

2nd

es6

import Lazyload from "vue-lazyload-img"
Vue.use(Lazyload)

es5

var Lazyload = require("vue-lazyload-img")
Vue.use(Lazyload)

in this way, you'll need babel or something like it

In browser

because this plugins supports umd, so you can use it as a <script> or with JS module loader like require.js.

the released bundle is in:

dist/vue.lazyimg.min.js dist/vue.lazyimg.js

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