3 lines
139 B
TypeScript
Raw Normal View History

2018-04-02 05:34:16 +00:00
export function canUseWebP(): boolean {
return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0
}