2.1.2 • Published 8 years ago

lazyimage v2.1.2

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

LazyImage

A React Component for Progressive Image Loading.

Build Status npm version Dependency Status devDependency Status

LazyImage loads a low-res version of an image blurred before replacing it with a larger, higher-res image after it was loaded completely. Inspired by a blog article on Medium's progressive image loading by José Manuel Pérez: https://jmperezperez.com/medium-image-progressive-loading-placeholder/

Install via npm

npm i --save lazyimage

Usage

import LazyImage from 'lazyimage'

...     

<LazyImage
  blurRadius="10"
  width="600"
  height="190"
  src="/path/to/very/large/image"
  low="/path/to/low/quality/image"
/>

Features

  • If no low-resolution source is provided a regular image is rendered.
  • blurRadius defaults to 10

Tests

Uses Lab, Code, Enzyme for unit tests. If you want to know more about React unit testing using Lab instead of Mocha or Tape read the blog post on Medium

Run tests with:

npm test

2.1.2

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago