From e15bbeb8966d27a610d86716c188bf8c6b43c230 Mon Sep 17 00:00:00 2001 From: Spirit Date: Sun, 2 Aug 2020 22:35:08 +0800 Subject: [PATCH] fix: fix webp image covver fix #234 --- inc/classes/Images.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/classes/Images.php b/inc/classes/Images.php index f0675f4..6ba6ccd 100644 --- a/inc/classes/Images.php +++ b/inc/classes/Images.php @@ -154,7 +154,7 @@ class Images $img_array = json_decode($sakura_image_array, true); $img = array_rand($img_array); $img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri(); - if (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp')) { + if (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false) { $imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0]; } else { $imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];