webp image format polyfill for browsers


Keywords
webp, polyfill, webp-polyfill, image-conversion
License
ISC
Install
npm install denfield-webp-hero@0.0.5

Documentation

denfield-webp-hero

browser polyfill for the webp image format

This is a clone of webp-hero package with support for background images.

Please see original documentation [https://github.com/chase-moskal/webp-hero].

You can pass list of selectors to be find and the script will recognize if this is an image or div element with background-image style.

Example

<script>
	var webpMachine = new webpHero.WebpMachine()
	webpMachine.polyfillDocument({selectors: "img, .bg"})
</script>