From 540e82a27aa3aaf047af0c968c0444d1d8cf13df Mon Sep 17 00:00:00 2001 From: "green-ponies (jgen)" Date: Sun, 15 Apr 2012 20:00:27 -0400 Subject: [PATCH] Actually use the mime type. --- ext/featured/main.php | 2 +- ext/random_image/main.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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())); } }