diff --git a/modules/doc/application/controllers/ModuleController.php b/modules/doc/application/controllers/ModuleController.php index 94bbf9583..3b65b23b0 100644 --- a/modules/doc/application/controllers/ModuleController.php +++ b/modules/doc/application/controllers/ModuleController.php @@ -176,7 +176,11 @@ class ModuleController extends DocController } else { $finfo = new finfo(); $this->getResponse() - ->setHeader('Content-Type', $finfo->file($imagePath, FILEINFO_MIME_TYPE)); + ->setHeader('Content-Type', $finfo->file($imagePath, FILEINFO_MIME_TYPE)) + ->setHeader('Content-Length', $imageInfo->getSize()) + ->sendHeaders(); + + ob_end_clean(); readfile($imagePath); } }