All Projects → wcandillon → react-progressive-image-loading

wcandillon / react-progressive-image-loading

Licence: Apache-2.0 license
Progressively load images using a blur effect.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to react-progressive-image-loading

lazy-load-images.js
Progressive & lazy loading images.
Stars: ✭ 17 (-85.34%)
Mutual labels:  progressive-image
django-progressiveimagefield
A Django ImageField that offers progressive image loading during HTML rendering.
Stars: ✭ 32 (-72.41%)
Mutual labels:  progressive-image
ngx-progressive-image-loader
lazy load img/picture, prevent reflow and seo friendly.
Stars: ✭ 35 (-69.83%)
Mutual labels:  progressive-image

React Progressive Image Loading

Progressively load images using a blur effect.

CircleCI npm version

example

Installation

$ npm install react-progressive-image-loading --save

Import

import ProgressiveImage from "react-progressive-image-loading";

Usage

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    render={(src, style) => <img src={src} style={style} />}
/>

Instead of using the img tag, you can use background-image with a div.

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    render={(src, style) => <div style={Object.assign(style, { backgroundImage: `url(${src})` })} />}
/>

You can also customize the transition time and the timing function used for that transition.

<ProgressiveImage
    preview="/images/tiny-preview.png"
    src="/images/preview.png"
    transitionTime={500}
    transitionFunction="ease"
    render={(src, style) => <img src={src} style={style} />}
/>
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].