79681642

Date: 2025-06-27 08:42:12
Score: 0.5
Natty:
Report link

As Firefox since Version 132 delivers the wildcard mime-type */* instead of image/webp , as you can see here:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Content_negotiation/List_of_default_Accept_values

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

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
Posted by: Mogens