Closed wmertens closed 3 years ago
it would be great if the result could include if the device probably supports WebP images.
I'd like to send more optimized images but not all browsers support .webp and now I have to do the support client-side in javascript.
.webp
If I know in advance that .webp is probably supported, the browser doesn't have to download .jpg at all, even if javascript isn't loaded yet.
.jpg
Basically, only IE and Safari don't support it
The script cannot detect the viewport, pixel density or resolution of the screen since it's running server-side.
From https://github.com/serbanghita/Mobile-Detect/blob/master/docs/KNOWN_LIMITATIONS.md
it would be great if the result could include if the device probably supports WebP images.
I'd like to send more optimized images but not all browsers support
.webp
and now I have to do the support client-side in javascript.If I know in advance that
.webp
is probably supported, the browser doesn't have to download.jpg
at all, even if javascript isn't loaded yet.Basically, only IE and Safari don't support it