# Python html file server using streamlit?

**URL:** <https://discuss.streamlit.io/t/python-html-file-server-using-streamlit/35775>\
**Category:** Custom Components\
**Created:** [January 7, 2023, 4:12pm UTC](https://discuss.streamlit.io/t/python-html-file-server-using-streamlit/35775 "2023-01-07T16:12:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mathcatsand](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/mathcatsand/32/48006_2.png) [@mathcatsand](https://discuss.streamlit.io/u/mathcatsand)\
**Post date:** [January 8, 2023, 2:33am UTC](https://discuss.streamlit.io/t/python-html-file-server-using-streamlit/35775/2 "2023-01-08T02:33:56Z")

</div>

The trouble is that the files in your repository aren’t automatically served up and made available to the web host. For example, when you use `st.image` and feed it a relative path to an image, then Python can get to it as a file saved in the back end. Streamlit will copy that image file and make it available to the web host at `./media/<some hash>.jpg`. (I am not clear if this is an actual copying over to another web host file architecture or just some routing that creates the local web paths virtually.)

So, you will either need to host the image files elsewhere or manually serve them up so they can be accessed via web. I was just playing with this recently, and @asehmi has a lovely example. [Hybrid architecture media server, media service and Streamlit client app using FastAPI and Python](https://discuss.streamlit.io/t/hybrid-architecture-media-server-media-service-and-streamlit-client-app-using-fastapi-and-python/27587)

---

_[View the full topic](https://discuss.streamlit.io/t/python-html-file-server-using-streamlit/35775)._
