# vue-lazy-image

> a lazy-image module for Vue 1.0+ & 2.0+

Latest version **1.2.0** (published 2017-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-lazy-image
pnpm add vue-lazy-image
yarn add vue-lazy-image
bun add vue-lazy-image
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-07-12 |
| First published | 2016-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | cc |
| Maintainers | ccforward |
| Keywords | lazy-image, lazy, vue lazy |

## Links

- npm: https://www.npmjs.com/package/vue-lazy-image
- Repository: https://github.com/ccforward/vue-lazy-image
- Homepage: https://github.com/ccforward/vue-lazy-image#readme
- Issues: https://github.com/ccforward/vue-lazy-image/issues
- npm.io page: https://npm.io/package/vue-lazy-image

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2017-07-12
- 1.1.0 — 2016-11-14
- 1.0.2 — 2016-11-14
- 1.0.1 — 2016-11-14
- 1.0.0 — 2016-11-14

## README

[![NPM version][npm-image]][npm-url]

# lazy-image for Vue
a lazy-image module for Vue 1.0+ & 2.0+

## npm package
[vue-lazy-image](https://www.npmjs.com/package/vue-lazy-image)

## demo
[vue-lazy-image-demo](http://zhihu.ccforward.net)

## usage

```js
const lazy = require('vue-lazy-image')
// or use ES2015
//import lazy from 'vue-lazy-image'

Vue.use(lazy);

```

```js
// or with options
Vue.use(lazy, {
    error: 'http://xxx.com/error.png', //error image
    loading: 'http://xxx.com/loading.png', //loading image
    try: 2, // the count of try to load one image
});

```


```html
<img v-lazy="item.image">
<div class="img" v-lazy:background-image="item.image"></div>
```


## build

```js

npm run build

```

[downloads-image]: https://img.shields.io/npm/dm/vue-lazy-image.svg
[npm-url]: https://www.npmjs.com/package/vue-lazy-image
[npm-image]: https://img.shields.io/npm/v/vue-lazy-image.svg

---
_Source: https://npm.io/package/vue-lazy-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
