Closed tomjak closed 6 hours ago
Is this a Firefox Support Channel?
No. I think the problem with serving .jpg files instead of .webp files is due to phpWCMS.
Here are some more details: phpWCMS 1.10.5/1.10.6 webp_enable = 1 Firefox 115.15.0esr loads images in .webp format Edge 130.0.2849.68 loads images in .web format Chrome 130.0.6723.92 loads images in .web format Firefox 132.0.1 loads images in .jpg format
In the file:
default.inc.php line 1062
I added support for Firefox, but I'm not sure if I did it correctly:
if (!empty($_SERVER['HTTP_ACCEPT']) && str_contains($_SERVER['HTTP_ACCEPT'], 'image/webp') || ($USER_AGENT && str_contains($USER_AGENT, ' Chrome/')) || ($USER_AGENT && str_contains($USER_AGENT, ' Firefox/')))
It works, please check the syntax.
I have added support for more browsers
Excellent. Thank you.
If the "webp_enable" setting is enabled, Chrome loads images in .web format, while Firefox loads images in .jpg format. Firefox supports the .web format. Is there a way to enable Firefox support for the Webp format?