# progressive-image-lazyload.js

> Progressive image with Lazyload

Latest version **1.0.4** (published 2019-06-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install progressive-image-lazyload.js
pnpm add progressive-image-lazyload.js
yarn add progressive-image-lazyload.js
bun add progressive-image-lazyload.js
```

## 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.0.4 |
| Published | 2019-06-14 |
| First published | 2019-06-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 851.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Arnolfo L. Federis |
| Maintainers | arnoldfederis |
| Keywords | progressive image, lazyload image, intersectobject, javascript, optimize |

## Links

- npm: https://www.npmjs.com/package/progressive-image-lazyload.js
- Repository: https://github.com/arnoldfederis/progressive-image-lazyload.js
- Homepage: https://github.com/arnoldfederis/progressive-image-lazyload.js#readme
- Issues: https://github.com/arnoldfederis/progressive-image-lazyload.js/issues
- npm.io page: https://npm.io/package/progressive-image-lazyload.js

## 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.0.4 (latest) — 2019-06-14
- 1.0.3 — 2019-06-14
- 1.0.2 — 2019-06-14
- 1.0.1 — 2019-06-14
- 1.0.0 — 2019-06-14

## README

## Progressive Image JS

![Progressive Image JS](https://i.imgur.com/o4aKBEH.png)

[Demo](https://progressive-image.js.arnoldfederis.com)

### Progressive image with Lazyload

### Install in `npm` or `yarn`

```
$ npm install progressive-image-lazyload.js

$ yarn add progressive-image-lazyload.js
```


### How to use

* `HTML` markup

```html
<figure class="graf-figure">
    <div class="aspectRatioPlaceholder">
        <div class="aspectRatioPlaceholder-fill"></div>
        <div class="progressiveMedia" data-width="1920" data-height="1080">
            <img class="progressiveMedia-thumbnail" data-thumb="https://i.imgur.com/glCxppa.png" alt="progressive-image-lazyload">
            <canvas class="progressiveMedia-canvas"></canvas>
            <img class="progressiveMedia-image" data-src="https://i.imgur.com/o4aKBEH.png" alt="progressive-image-lazyload">
        </div>
    </div>
</figure>
```

* In `HTML` put this line of code inside your `<head>` tag

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/progressive-image-lazyload.js@1.0.4/dist/progressive-image-lazyload.css">
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/progressive-image-lazyload.js@1.0.4/dist/progressive-image-lazyload.js"></script>
```

* In `JavaScript` and `SCSS` using npm or yarn

```scss
/* SCSS */
@import "~progressive-image-lazyload.js/src/scss/progressive-image";
```

```javascript
/* JavaScript */
import 'progressive-image-lazyload.js'
```

* `data-thumb` this is where you set your small image.
* `data-src` this is where you set your large image.

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