public function stream($filename = 'image.jpg') { return new StreamedResponse(function () { echo $this->output(); }, 200, array('Content-Type' => 'image/jpeg', 'Content-Disposition' => 'inline; filename="' . $filename . '"')); }