UNPKG

webp-hero

Version:

webp image format polyfill for browsers

12 lines (11 loc) 388 B
import { Webp } from "../libwebp/dist/webp.js"; export declare type DetectWebpImage = (image: HTMLImageElement) => boolean | Promise<boolean>; export interface WebpMachineOptions { webp?: Webp; webpSupport?: boolean | Promise<boolean>; detectWebpImage?: DetectWebpImage; useCanvasElements?: boolean; } export interface PolyfillDocumentOptions { document?: Document; }