import re


def isdatauri(value):
    """
    Return whether or not given value is base64 encoded data URI such as an image.
    If the value is base64 encoded data URI, this function returns ``True``, otherwise ``False``.

    Examples::

        >>> isdatauri('data:text/plain;base64,Vml2YW11cyBmZXJtZW50dW0gc2VtcGVyIHBvcnRhLg==')
        True

        >>> isdatauri('dataxbase64data:HelloWorld')
        False

    :param value: string to validate base64 encoded data URI
    """
    data_uri = re.compile(r"\s*data:([a-zA-Z]+/[a-zA-Z0-9\-+]+(;[a-zA-Z\-]+=[a-zA-Z0-9\-]+)?)?(;base64)?,[a-zA-Z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$")
    return bool(data_uri.match(value))