Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add webp support in Safari browser

Tags:

image

safari

webp

In my site, I have added all images in webp format. All those images are showing properly in Chrome and Firefox browsers, but they do not show properly in Safari.

like image 571
wohifov Avatar asked Oct 21 '19 13:10

wohifov


People also ask

Does Safari browser support WebP images?

WebP image format is Not Supported on Safari 11, which means that any user who'd be accessing your page through Safari 11 can see it perfectly. Browser incompatibility may be due to any other web technology apart from WebP image format.

How do you WebP on Safari?

You cannot just change the webp files to make them to work on incompatible Safari versions that do not support it. It will not work. So, for older safari versions, your only solution is to maintain a copy of every image in PNG or JPG format, or use an image CDN to do this automatically for you.

Is WebP supported by all browsers 2022?

WebP image format on Android Browser is fully supported on 4.4-103, partially supported on 4.1-4, and not supported on 2.3-3 Android Browser versions. WebP image format on Opera Mobile is fully supported on 11.5-64, partially supported on 11-11, and not supported on 10-10 Opera Mobile versions.

Does Apple support WebP images?

Apple already implemented webP/webM support to Safari for iOS and macOS Big Sur. webP and webM is getting a wide spread standard which exist around 10 years.


2 Answers

The webp format is not supported by Safari as of today, and I'm not sure if it is planned for implementation in the near future. But you can give the browser a choice whether to use webp or jpg like so.

<picture>   <source srcset="     /uploads/img_small.webp 1x,     /uploads/img_big.webp 2x" type="image/webp">   <source srcset="     /uploads/img_small.jpg 1x,      /uploads/img_big.jpg 2x" type="image/jpeg">   <img src="/uploads/img_small.jpg"> </picture> 

The browsers are smart enough to download and use only the best supported image.

like image 52
GEkk Avatar answered Nov 12 '22 09:11

GEkk


WebP official support has been added in Safari 14 on macOS Big Sur as well as iOS, iPadOS & company.

Source: https://www.macrumors.com/2020/06/22/webp-safari-14

like image 41
serniko97 Avatar answered Nov 12 '22 08:11

serniko97