The is.supportWebp has some performance costs due to the use of toDataUrl. This allows you to avoid that.
Note that technically it is async but it is going to resolve almost instantly.
is.supportingWebpAsync().then((supports)=> { if(supports) { ...supported }}); Copy
is.supportingWebpAsync().then((supports)=> { if(supports) { ...supported }});
The is.supportWebp has some performance costs due to the use of toDataUrl. This allows you to avoid that.
Note that technically it is async but it is going to resolve almost instantly.