be-lazy-image

1.1.0 • Public • Published

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 ❕

  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 😉

Package Sidebar

Install

npm i be-lazy-image

Weekly Downloads

1

Version

1.1.0

License

ISC

Unpacked Size

15.9 kB

Total Files

7

Last publish

Collaborators

  • sieradz628