mikehaertl\wkhtmlto\Image::getMimeType PHP Method

getMimeType() public method

public getMimeType ( ) : string
return string the mime type for the current image
    public function getMimeType()
    {
        if ($this->type === 'jpg') {
            return 'image/jpeg';
        } elseif ($this->type === 'png') {
            return 'image/png';
        } elseif ($this->type === 'bmp') {
            return 'image/bmp';
        } else {
            throw new \Exception('Invalid image type');
        }
    }