Skip to content

Vue2 plugins support auto replace .png or .jpg to .webp if browse support

License

Notifications You must be signed in to change notification settings

mizuka-wu/vue-webp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vue-webp

A plugin help you replace .png .jpg to .webp

How to use

// in your main.js
import webp from 'vue2-webp'
Vue.use(webp)

// where you need to replace
<img v-webp="src" />

How it works

In construct it will check the browser, and if browser support use webp, it will replace .png or .jpg to .webp

To do

  1. support mobile
  2. test webp file before replace
  3. more config

About

Vue2 plugins support auto replace .png or .jpg to .webp if browse support

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published