I can't add image like logo and picture in streamlit webpage

I hosted a webpage on streamlit cloud. However, it is giving an error. It can’t find the image and pictures.

Hi @Data_Tashi, welcome to the community! :partying_face:

The path to all the images the images need to be updated in your Image.open() commands. Currently, the path contains D:/DHI_GIC/pic/ as a prefix. That prefix is specific to your local machine.

On Streamlit Cloud, as your images are in the root of your GitHub repo, you can remove the D:/DHI_GIC/pic/ prefix and pass just the image filenames to Image.open().

For example, Image.open("D:/DHI_GIC/pic/excel.jpg") would become:


Happy Streamlit-ing! :balloon:

1 Like