def METHOD_NAME(self, images): # TODO: Unify with other report image to html conversion
    """ Convert Matplotlib figure 'fig' into a <img> tag for HTML use using base64 encoding. """
    html = FEET_1 % self.data.name
    for fig in images:
        canvas = FigureCanvas(fig)
        png_output = BytesIO()
        try:
            if sys.platform == "darwin":
                fig.savefig(png_output, format="png", dpi=150)
            else:
                fig.savefig(png_output, format="png", dpi=75)
        except PermissionError as ex:
            logging.error("Creating of the report failed: %s"%str(ex))
            return
        data64 = base64.b64encode(png_output.getvalue())
        data_to_print = urllib.parse.quote(data64)
        feet = FEET_2
        if sys.platform == "darwin":  # Mac
            feet = FEET_3
        html += feet.format(data_to_print)
        html += ELINE
        png_output.close()
        del canvas
    return html