Convert an HTML string to image data and display it as an image in a template using Python. I have a string like below
text = """< html>< body>< p style='color:red'>Stack Overflow< /p>< /body>< /html>
"""
I need to convert it as image data and to display that image into a template page.