0.1.0 • Published 6 years ago

v-webp-next v0.1.0

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

✨ Features:

  • use webp when supported
  • support background-image and img

🔧 Installation

NPM

npm install v-webp-next --save

YARN

yarn add v-webp-next

📦 Usage

// install
import VWebp from 'v-webp-next'
Vue.use(VWebp)

// nromal use with img
<img v-webp="./static/img/test.jpg"/>
<img v-webp="require('./assets/test.jpg')"/>
<img v-webp="[require('./assets/test.jpg'), require('./assets/test.webp')]"/>

// add modifier .bg when use image in background-image property
<div v-webp.bg="[require('./assets/test.jpg'), require('./assets/test.webp')]"></div>
<div v-webp.bg="./static/img/test.jpg"></div>
0.1.0

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago