import base64


def data2html_img(data):
    """Converts a png image (bytes) to HTML str with the image in base64
    """
    img = base64.encodebytes(data).decode('utf-8')
    return '<img src="data:image/png;base64, {}"/>'.format(img)