How to create a slideshow of pictures on Streamlit and publish it on streamlit cloud

I am trying to create a slideshow of all my pictures and show it on streamlit app. below is the code and it does not work if I use a β€œfor” loop. I am new to streamlit. can you please guide?
path = β€œC:/Users/user1/OneDrive/Documents/UK_TRIP”
filenames = glob.glob(os.path.join(path, β€œ*”))
for filename in filenames:
image =
st.image(image, caption=β€˜Enter any caption here’)

Hi there,

Thanks for sharing your question with the community! Check out our guidelines on how to post an effective question here – in particular, please format your code properly so community members can reproduce the issue.

Caroline :balloon:


Take a look at this app: Hybrid architecture media server, media service and Streamlit client app using FastAPI and Python


Thanks Caroline. Sure, will do for future posts.

Thank you for sharing the link. very interesting.