@shopgate/engage
Version:
Shopgate's ENGAGE library.
4 lines • 306 B
JavaScript
import{isAndroidOs,isIOs}from'@shopgate/pwa-core';import detector from'detector';/**
* Gets the image format, which should be used
* @returns {string} webp OR jpeg
*/export var getImageFormat=function getImageFormat(){var format=isAndroidOs||isIOs&&detector.os.version>=14?'webp':'jpeg';return format;};