function handle() { $path = $this->imageInfo->getFilePath($this->size); if (!file_exists($path)) { throw new VoiceException(CommonMessages::get()->msg('NO_FILE')); } $ct = ImageFile::type2ContentType($this->imageInfo->type); if ($ct) { header("Content-type: {$ct}"); } header('Content-Length: ' . filesize($path)); readfile($path); }