0.2.0 • Published 7 years ago
webp.js v0.2.0
webp.js
webp.js is a library for webp detection.
Here's an example:
var webpjs = require('webp.js');
if (webpjs()) {
//do something
}
By using cookie, you can process your images at the backend.
var webpjs = require('webp.js');
if (webpjs({ type:'cookie' })) {
//do something
}
Get the cookies at the backend, if the value of webp
is 1
, that means current browser support webp.