As Firefox since Version 132 delivers the wildcard mime-type */*
instead of image/webp
, as you can see here:
In PHP(since version 8) the easiest way to detect webp Support is:
if(str_contains($_SERVER['HTTP_ACCEPT'], 'image/webp') or str_contains($_SERVER['HTTP_ACCEPT'], '*/*'))
{
// ... Webp is supported
}
Also testet in Safari and Edge. Works