Skip to content

Function: supportsWebP()

ts
function supportsWebP(): Promise<boolean>;

Returns true if WebP image format is supported in the current browser.

Returns

Promise<boolean>

Example

ts
const result = await supportsWebP()
result // => true or false

Since

1.0.0

Released under the MIT License.