diff --git a/include/class.http.php b/include/class.http.php
index 2616121c24b130f365f58b2b10f1d1810be118c8..632a80b03b230fe8a941be470406cd79e871c8b8 100644
--- a/include/class.http.php
+++ b/include/class.http.php
@@ -106,6 +106,9 @@ class Http {
     }
 
     function download($filename, $type, $data=null, $disposition='attachment') {
+        if (strpos($type, 'image/') !== 0 || preg_match('/image\/.*\+.*/', $type))
+          $disposition='attachment';
+
         header('Pragma: private');
         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
         header('Cache-Control: private', false);