be-lazy-image
v1.1.0
Published
classic vueJS component for lazy loading images
Downloads
3
Maintainers
Readme
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:
the component uses axios - by default it adding axios during it's own installation
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: