Static file serving not working, also not the example from the documentation

I have made a streamlit app using static file serving for images but I couldn’t get it to work. So I downloaded the official example from here (complete folder of course) GitHub - streamlit/static-file-serving-demo and ran it locally.

The images do not show up and there is no error message present.

Why could that be?

Python 3.11.5
Streamlit 1.36.0

Works for me in streamlit cloud.

And locally too.

I had the exact same issue. Spent 30 mins debugging and searching for solution. Frustrated shut the app, had coffee, calmed down and re-run using streamlit run app.py… and magic… voila…

Apparently I made all the changes for serving static files when my app was already running. Restart/re-run the app and should work.