1.1.0 • Published 5 years ago

be-lazy-image v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

BeLazyImage

classic vueJS component for lazy loading images

How to use?

1. install:

$ npm i be-lazy-image
$ yarn add be-lazy-image

2. import to your vue

import BeLazyImage from 'be-lazy-image'

3. add a component to your components declaration

components: {
  BeLazyImage,
  ...
}

4. use it

<BeLazyImage imagePathMin="[link  to thumbnail]" imagePath="[link to the image with original resolution]" imageAlt="[alternative text]" />

Important notes :grey_exclamation:

  1. the component uses axios - by default it adding axios during it's own installation

  2. for ease of use: the CSS for img from the component is set to:

width: 100%;
height: 100%;

so, it always takes the size of the element it's in :wink: