Actually use the mime type.
This commit is contained in:
parent
0c37be79a0
commit
540e82a27a
2 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ class Featured extends Extension {
|
|||
$image = Image::by_id($config->get_int("featured_id"));
|
||||
if(!is_null($image)) {
|
||||
$page->set_mode("data");
|
||||
$page->set_type("image/jpeg");
|
||||
$page->set_type($image->get_mime_type());
|
||||
$page->set_data(file_get_contents($image->get_image_filename()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class RandomImage extends Extension {
|
|||
if($action === "download") {
|
||||
if(!is_null($image)) {
|
||||
$page->set_mode("data");
|
||||
$page->set_type("image/jpeg");
|
||||
$page->set_type($image->get_mime_type());
|
||||
$page->set_data(file_get_contents($image->get_image_filename()));
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue