lscache_wp
lscache_wp copied to clipboard
webp not working in Safari 14.0.1 (in versions macOS earlier Big Sur)
I have macOS 10.14.6 & Safari 14.0.1 Installed plugin update 3.6
And … All the pictures are gone !!! Because webp in this version of the browser (14.0.1) is only supported in BigSur
Now what ?!
Hi,
Could you please provide the full user agent header from your safari ?
Best regards,
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15
Hi,
please either revert to previous version , or use this htaccess rewrite rule as temp fix
RewriteCond %{HTTP_ACCEPT} "!image/webp"
RewriteRule ^(.*).(jpg|jpeg|png|gif).webp $1.$2 [L]
We will investigate this further and hopefully to find a reliable way to differentiate 10.14 and 11.0
Best regards,
Reverted and fixed in https://github.com/litespeedtech/lscache_wp/compare/72edb33b6b3c...b2c7a3df75cd
FYI, my MacOS Catelina UA is User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
Will add a JS detection to make it. Ref from ruikai https://stackoverflow.com/questions/5573096/detecting-webp-support
Will be later versions as it needs to update vary.
Cool! Thanks 👍
Will add a JS detection to make it.
@hi-hai PHP detection won't be better? So the browser won't have to load another script. It is simple:
if( strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false ) {
// webp is supported!
}
Will add a JS detection to make it.
PHP detection won't be better? So the browser won't have to load another script.
if( strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false ) { // webp is supported! }
Yeah , that's first thing we thought , but sadly no, Mac Safari doesn't put image/webp on accept header over main request.