@property
    def data_uri(self):
        """The raw image data as a data: URI.

        Will always return :class:`None` if the image isn't loaded.
        """
        if not self.is_loaded:
            return None
        if self.format is not ImageFormat.JPEG:
            raise ValueError(self.format % 'Unknown image format: %r')
        return 'data:image/jpeg;base64,%s' % (
            base64.b64encode(self.data).decode('ascii'))
dataset/ETHPy150Open mopidy/pyspotify/spotify/image.py/Image.data_uri/swapped operands of `%`