Checks if the browser supports WebP. Cheaply and synchronously.
npm install supports-webp-sync 
Checks if the browser supports WebP without any costly requests.
May give false negatives for some obscure non-WebKit browsers.
Live check: https://ihordiachenko.github.io/supports-webp-sync/
``bash`
npm i -S supports-webp-sync
`js
import { checkWebPSupport } from 'supports-webp-sync'
if (checkWebPSupport()) {
// Get some WebP images
}
``