diff --git a/ext/featured/main.php b/ext/featured/main.php index dbf71d49..928802bd 100644 --- a/ext/featured/main.php +++ b/ext/featured/main.php @@ -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())); } } diff --git a/ext/random_image/main.php b/ext/random_image/main.php index 5a77bb25..ced59d67 100644 --- a/ext/random_image/main.php +++ b/ext/random_image/main.php @@ -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())); } }