Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

embed image in html from python

import base64
data_uri = base64.b64encode(open('Graph.png', 'rb').read()).decode('utf-8')
img_tag = '<img src="data:image/png;base64,{0}">'.format(data_uri)
print(img_tag)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #embed #image #html #python
ADD COMMENT
Topic
Name
5+9 =