Return a mimetype from the file extension.

    :param string path: the file path
    :rtype: string

def mimetype_from_path(path):
    """
    Return a mimetype from the file extension.

    :param string path: the file path
    :rtype: string
    """
    extension = file_extension(path)
    if extension is not None:
        extension = extension.lower()
        if extension in gc.MIMETYPE_MAP:
            return gc.MIMETYPE_MAP[extension]
    return None