vue-webp-lazyload

1.1.0 • Public • Published

vue-webp-lazyload

intro

A concise Vue plugin that provides webp images and lazyload

download

npm install -save vue-webp-lazyload

usage

main.js

import lazyLoad from '@/vue-lazyload/index.js'

Vue.use(lazyLoad,{
  loadImg:'/static/loading.svg',
  failImg:'/static/fail.png',
  openWebp:false
})

template

 <img v-webp="{image:'https://grewer.github.io/dataSave/back.jpg',
      webp:'https://grewer.github.io/dataSave/back.webp'}">

grammar

param explanation
loadImg Loading picture
failImg Failed to load the picture
openWebp Whether to support webp picture

github

License

MIT

Copyright (c) 2018-present, Grewer

/vue-webp-lazyload/

    Package Sidebar

    Install

    npm i vue-webp-lazyload

    Weekly Downloads

    6

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    9.27 kB

    Total Files

    4

    Last publish

    Collaborators

    • grewer-user