PhpOffice\PhpPresentation\Shape\Drawing\File::getMimeType PHP Method

getMimeType() public method

public getMimeType ( ) : string
return string
    public function getMimeType()
    {
        if (!file_exists($this->getPath())) {
            throw new \Exception('File ' . $this->getPath() . ' does not exist');
        }
        $image = getimagesize($this->getPath());
        return image_type_to_mime_type($image[2]);
    }