okld / streamlit-gallery

A personal gallery of streamlit apps and components.
https://share.streamlit.io/okld/streamlit-gallery/main
107 stars 142 forks source link

CardMedia for image #3

Open RRaphaell opened 2 years ago

RRaphaell commented 2 years ago

how to use mui.CardMedia for local images?

m-glowacki commented 1 year ago

any updates on this?

RRaphaell commented 1 year ago

@m-glowacki

you can write

mui.CardMedia( component="img", src="img_name.png", )

but you have to save this img_name.png in the specific location (I dont remembr where) this component reads this image from it's specific folder. Run this and based on the error you will find out

as I remember it can't read image from other location, that's why you need this workaround that I mention