denfield-webp-hero
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

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> 

Package Sidebar

Install

npm i denfield-webp-hero

Weekly Downloads

1

Version

0.0.5

License

ISC

Unpacked Size

1.14 MB

Total Files

50

Last publish

Collaborators

  • d-magic