diff --git a/src/Intervention/Image/Response.php b/src/Intervention/Image/Response.php index 076d08fc..28a3782d 100644 --- a/src/Intervention/Image/Response.php +++ b/src/Intervention/Image/Response.php @@ -49,15 +49,18 @@ class Response $this->image->encode($this->format, $this->quality); $data = $this->image->getEncoded(); $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $data); + $length = strlen($data); if (function_exists('app') && is_a($app = app(), 'Illuminate\Foundation\Application')) { $response = \Response::make($data); $response->header('Content-Type', $mime); + $response->header('Content-Length', $length); } else { header('Content-Type: ' . $mime); + header('Content-Length: ' . $length); $response = $data; }