# vue-lazyload-akamai

> Vue.js lazy load image directive with akamai image converter

Latest version **1.2.1** (published 2018-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-lazyload-akamai
pnpm add vue-lazyload-akamai
yarn add vue-lazyload-akamai
bun add vue-lazyload-akamai
```

## 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.1 |
| Published | 2018-06-07 |
| First published | 2018-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Blibli.com Tech Team |
| Maintainers | dodotdot, havban, irfan.maulana |
| Keywords | lazyload image, vue lazyload image, vue lazyload akamai, image converter, akamai image converter |

## Links

- npm: https://www.npmjs.com/package/vue-lazyload-akamai
- Repository: https://github.com/bliblidotcom/vue-lazyload-akamai
- Issues: https://github.com/bliblidotcom/vue-lazyload-akamai/issues
- npm.io page: https://npm.io/package/vue-lazyload-akamai

## Dependencies (1)

- [akamai-image-converter](https://npm.io/package/akamai-image-converter.md) ^0.0.3

## 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.1 (latest) — 2018-06-07
- 1.2.0 — 2018-05-08
- 1.1.0 — 2018-05-08
- 1.0.0 — 2018-05-07

## README

# vue-lazyload-akamai

> Vue.js lazy load image directive with akamai image converter

[![License](https://img.shields.io/github/license/bliblidotcom/vue-lazyload-akamai.svg?longCache=true)](https://github.com/bliblidotcom/vue-lazyload-akamai) [![version](https://img.shields.io/npm/v/vue-lazyload-akamai.svg?maxAge=3600)](https://www.npmjs.com/package/vue-lazyload-akamai)
[![downloads](https://img.shields.io/npm/dt/vue-lazyload-akamai.svg?maxAge=86400)](https://www.npmjs.com/package/vue-lazyload-akamai)

## 💅 Demo Page

https://bliblidotcom.github.io/vue-lazyload-akamai/

or via forked version here: https://mazipan.github.io/vue-lazyload-akamai/

## 🛠 Install with NPM/Yarn

```
npm install vue-lazyload-akamai
// OR
yarn add vue-lazyload-akamai
```

## 🚀 Usage Guide

**Add plugins in `main.js`**

```js
import VueLazyloadAkamai from 'vue-lazyload-akamai'
Vue.use(VueLazyloadAkamai, {optionalConfigs})
```

✅ Available configs explanations:

| Config Name       | Type     | Description             |
| ------------------|----------|-------------------------|
| `useWebp`         | Boolean  | Using webp when support |
| `quality`         | Number   | Quality of image (using scala from 10-100) |
| `width` & `height`| Number   | Width and Height of image (in pixel unit) |
| `fallback`        | String   | Global fallback image if attr `data-err` not setted |
| `placeholder`     | String   | Global placeholder image if attr `src` not setted |
| `timeout`         | Number   | Timeout before image replaced (in millisecond unit) |

**Using in your Vue components:**

```html
<img v-lazyimg
    src="{placeholder image}"
    data-src="{original image}"
    data-err="{fallback image}">
```

✅ Attribute explanations:

| Attribute Name | Description        |
| ---------------|--------------------|
| `src`          | Use as placeholder/loading image before original image was loaded. |
| `data-src`     | Original image that we want to load after user scroll to it's sections |
| `data-err`     | Image as fallback when original image failed to load (404 response) |
| `data-quality` | Quality of image (using scala from 10-100)  |
| `data-width`   | Width of image in pixel unit  |
| `data-height`  | Height of image in pixel unit  |

## 🗿 Polyfill

https://github.com/w3c/IntersectionObserver/tree/master/polyfill

## ▶️ Development

```js
// For development
npm run dev

// For build demo page
npm run build-demo

// For build library file
npm run build-lib

// Publish demo page
npm run publish-demo

// Build and publish demo
npm run dist
```


Copyright © 2018 by [Blibli.com Tech Team](https://github.com/bliblidotcom) - Released Under MIT License

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