Blurred image for Angular 2

See live demo.

Installation

Install the npm package.

npm i ngx-blurred-image

Import module:

import {BlurredImageComponent} from 'ngx-blurred-image/components';

@NgModule({
    declarations: [BlurredImageComponent]
})

Usage

<div
	blurred-image
	[small]="base64"
	preview="path_to_image"
	[size]="{width: image_width, height: image_height}"></div>

Properties

small: string
Thumbnail image in base64 format.
preview: string
Path to full-size image.
size: object
Width and height of the container with the image.
delay: number
The delay in ms before showing the image.