2018-04-02 07:34:16 +02:00

3 lines
139 B
TypeScript

export function canUseWebP(): boolean {
return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0
}