webp.js
0.2.0 • Public • Published webp.js
webp.js is a library for webp detection.
Here's an example:
var webpjs = require('webp.js');
if (webpjs()) {
}
By using cookie, you can process your images at the backend.
var webpjs = require('webp.js');
if (webpjs({ type:'cookie' })) {
}
Get the cookies at the backend, if the value of webp
is 1
, that means current browser support webp.
Package Sidebar
Install
Weekly Downloads