src/Image/Server.php
private function outputImage(string $imagePath = ''): void
    {
        $fPointer = \fopen($imagePath, 'rb');
        $this->sendCachingHeaders($imagePath);
        \header('Content-Type: '.$this->getImageContentType());
        \header('Content-Length: '.\filesize($imagePath));
        \fpassthru($fPointer);
        \fclose($fPointer);
        die();
    }
private function outputImage(string $imagePath = ''): void
    {
        $fPointer = \fopen($imagePath, 'rb');
        $this->sendCachingHeaders($imagePath);
        \header('Content-Type: '.$this->getImageContentType());
        \header('Content-Length: '.\filesize($imagePath));
        \fpassthru($fPointer);
        \fclose($fPointer);
        die();
    }
private function outputImage ( string $ imagePath = '' ) : void { $ fPointer = \ fopen ( $ imagePath , 'rb' ) ; $ this -> sendCachingHeaders ( $ imagePath ) ; \ header ( 'Content-Type: ' . $ this -> getImageContentType ( ) ) ; \ header ( 'Content-Length: ' . \ filesize ( $ imagePath ) ) ; \ fpassthru ( $ fPointer ) ; \ fclose ( $ fPointer ) ; die ( ) ; }
Reads image from disk and outputs it

@param string $imagePath
Reads image from disk and outputs it