Skip to content

vitaliy-bobrov/webp-support

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebP Support

Bower version npm version npm

A pure javascript (no jQuery) lightweight library that checks browser WebP format support and adds 'webp' class to body if supported.

What is WebP? - Answer

Bower

bower install --save webp-support

npm

npm install --save webp-detect

Usage

Include the script in your HTML

<script src="bower_components/webp-support/webp.min.js"></script>

or add to your bundle:

require('webp-detect');

If browser support webp format it'll add the webp class to body tag.

Also you can import ES2015 version in your scripts.

About

Simple script to check browser support of webp images format.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published