mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-22 23:08:14 +08:00
parent
7a96dd7549
commit
e15bbeb896
@ -154,7 +154,7 @@ class Images
|
|||||||
$img_array = json_decode($sakura_image_array, true);
|
$img_array = json_decode($sakura_image_array, true);
|
||||||
$img = array_rand($img_array);
|
$img = array_rand($img_array);
|
||||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
$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];
|
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0];
|
||||||
} else {
|
} else {
|
||||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
||||||
|
Loading…
Reference in New Issue
Block a user