Open yubeizhu opened 2 years ago
Hello @yubeizhu, unfortunately Streamlit Elements does not support custom static folders as you noticed. However using a base64 data URI should work. Do you have any error in your browser's developer console?
Hi okld,
It seems the html.Img couldn't support base64 data uri. It report' "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/streamlit_elements/frontend/build/data:image/ping;base64,XXXXX", file name too long'.
When I use image component like html.Img( src = "/static/xxx.jpg"), the root location is the module's path "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/streamlit_elements/frontend/build/". So I can't load images in my own folders.
Same issus happens when I use src = "data:image/png;base64,XXXXX", which should use the bytes data.
Thanks for your job on this cool package!