Hey guys!
I’m trying to render an SVG image that is a long arrow… As I’m loading some png images with the base64 help, I tried to extend it to svg but it’s not loading the file in the application;
This is the code that I’m using to load the image:
import base64
image_filename = 'assets/static/green_arrow_long.svg'
encoded_image = base64.b64encode(open(image_filename, 'rb').read()).decode()
app.layout = html.Div([
html.Img(src='data:image/png;base64,{}'.format(encoded_image))
])
I did a lot of searches but I can’t find an answer to this problem… Could someone give me some direction about it?
Thank you very much in advance;
Best,
Leonardo
3 posts - 2 participants






