@kuoruan/webp-supported
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

webp-supported

Detect whether the browser supports WebP (0.3KB)

Install

$ npm install --save @kuoruan/webp-supported

Or with Yarn

$ yarn add @kuoruan/webp-supported

Usage

import WebPSupported from "@kuoruan/webp-supported";

if (WebPSupported()) {
  console.log("Load WebP");
} else {
  console.log("Load JPEG");
}

Package Sidebar

Install

npm i @kuoruan/webp-supported

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.23 kB

Total Files

8

Last publish

Collaborators

  • kuoruan