summaryrefslogtreecommitdiffstats
path: root/image.php
diff options
context:
space:
mode:
Diffstat (limited to 'image.php')
-rw-r--r--image.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/image.php b/image.php
index ac91ad79..267e6f14 100644
--- a/image.php
+++ b/image.php
@@ -102,11 +102,13 @@ switch ($_GET['type']) {
readfile(Config::get('prefix') . Config::get('theme_path') . '/images/blankalbum.jpg');
break;
} // else no image
-
- if (!$art->thumb_mime) { unset($_GET['thumb']); }
-
- $mime = $_GET['thumb'] ? $art->thumb_mime : $art->raw_mime;
- $source = $_GET['thumb'] ? $art->thumb : $art->raw;
+
+ if ($_GET['thumb']) {
+ $thumb_data = $art->get_thumb($size);
+ }
+
+ $mime = $thumb_data ? $thumb_data['thumb_mime'] : $art->raw_mime;
+ $source = $thumb_data ? $thumb_data['thumb'] : $art->raw;
$extension = Art::extension($mime);
// Send the headers and output the image