mirror of
https://github.com/e107inc/e107.git
synced 2025-08-28 08:39:57 +02:00
Issue #4270 Added .webp browser-support detection. Media-Manager "Convert to webp during render" can now be safely enabled and will temporarily fallback to the regular image if the browser does not support webp images.
This commit is contained in:
@@ -419,7 +419,7 @@ $sysprefs = new prefs;
|
||||
//DEPRECATED, BC, call e107::getPref/findPref() instead
|
||||
|
||||
|
||||
if(e_ADMIN_AREA !== true && !isset($_E107['no_parser']) && !empty($pref['thumb_to_webp']))
|
||||
if(e_ADMIN_AREA !== true && !isset($_E107['no_parser']) && !empty($pref['thumb_to_webp']) && (strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false))
|
||||
{
|
||||
$tp->setConvertToWebP(true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user