Skip to content

Commit 3eaf636

Browse files
committed
fix phpthumb webp support
1 parent 50014c7 commit 3eaf636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/HelperProcessor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function phpThumb($input = '', $options = '', $webp = true)
107107
}
108108

109109
if (isset($webp) && class_exists('\WebPConvert\WebPConvert')) {
110-
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Mac OS') === false ) {
110+
if( isset( $_SERVER['HTTP_ACCEPT'] ) && strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false ) {
111111
if (file_exists($outputFilename . '.webp')) {
112112
$fNameSuf .= '.webp';
113113
} else {

0 commit comments

Comments
 (0)