1.5.0 • Published 6 years ago

ngx-lazy-images v1.5.0

Weekly downloads
15
License
MIT
Repository
github
Last release
6 years ago

Load images in background while showing a placeholder with a blurred thumbnail till the image is fully loaded (Optimize your page initial load time)

This library is under active development and hasn't yet reached its final form.

inspired by this Medium article

Compatibility

  • AOT
  • Jit
  • Custom Design Libraries (Material, ng-bootstrap, etc..)

Getting Started

Installation

npm i --save ngx-lazy-images

Import to App module

import { LazyImagesModule } from 'ngx-lazy-images';

@NgModule( {
	imports: [
		...
		LazyImagesModule,
	],
	...
} ) export class AppModule { }

Example Usage

Can be found at the demo page

API

  • largeImgUrl - the original heavy image url
  • thumbnailUrl - thumbnail url (200-500KB recommended)
  • styling - object containing styling properties for the large image eg. { 'border-radius': '12%'}

TODO

  • support for two way binding for the image url (in case the image can change due to a user event).
  • support for scroll events and detection of reaching the image elemnt to load
  • testing/travis

License

MIT

1.5.0

6 years ago

1.4.8

6 years ago

1.4.7

6 years ago

1.4.6

6 years ago

1.4.5

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.1

6 years ago

1.4.2

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.0.0

6 years ago