mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-24 17:47:40 +01:00
Fix content type on webp
This commit is contained in:
parent
8efdbed0b4
commit
26a987c98d
@ -88,6 +88,8 @@ $stmt->bind_result($tnewimage, $timage, $format, $thash, $tlast);
|
||||
if ($stmt->fetch()) {
|
||||
if ($format == 0) {
|
||||
header('Content-Type: image/png');
|
||||
} else if ($format == 2) {
|
||||
header('Content-Type: image/webp');
|
||||
} else {
|
||||
header('Content-Type: image/jpeg');
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ list($timage, $format, $thash, $tlast) = $stmt->fetch();
|
||||
if ($res && $timage) {
|
||||
if ($format == 0) {
|
||||
header('Content-Type: image/png');
|
||||
} else if ($format == 2) {
|
||||
header('Content-Type: image/webp');
|
||||
} else {
|
||||
header('Content-Type: image/jpeg');
|
||||
}
|
||||
|
@ -89,6 +89,8 @@ if (isset($row[1])) {
|
||||
$format = $row[1];
|
||||
if ($format == 0) {
|
||||
header('Content-Type: image/png');
|
||||
} else if ($format == 2) {
|
||||
header('Content-Type: image/webp');
|
||||
} else {
|
||||
header('Content-Type: image/jpeg');
|
||||
}
|
||||
|
@ -74,6 +74,8 @@ if (strstr($path, ".png")) {
|
||||
header("Content-Type: image/png");
|
||||
} elseif (strstr($path, ".jpg")) {
|
||||
header("Content-Type: image/jpeg");
|
||||
} elseif (strstr($path, ".webp")) {
|
||||
header("Content-Type: image/webp");
|
||||
} else {
|
||||
header("Content-Type: application/text");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user