diff --git a/http2pic.class.php b/http2pic.class.php index 79a6254..96aca94 100644 --- a/http2pic.class.php +++ b/http2pic.class.php @@ -231,11 +231,13 @@ class http2pic if ($this->params['type'] === 'png') { header('Content-Type: image/png'); + header('Content-Disposition: inline; filename="'.$this->trimToAlphaNumeric($this->params['url']).'"'); $result = imagecreatefrompng($this->params['file']); imagepng($result, NULL, 9); } else { header('Content-Type: image/jpeg'); + header('Content-Disposition: inline; filename="'.$this->trimToAlphaNumeric($this->params['url']).'"'); $result = imagecreatefromjpeg($this->params['file']); imagejpeg($result, NULL, 100); }