Display images one by one with a next button

I have a streamlit code snippet below, where I iterate through a folder to display all the images there.

if st.button("Display images with PII"):
        out_folder = "output"
        for i in os.listdir(out_folder):
            if i.endswith(("jpg", "jpeg", "png")):
                image = Image.open(os.path.join(out_folder, i))
                st.image(image, caption=i)

However, I do not want to display all the images at one go, but rather one image at a time, preferably with a “Next” button to show the next image. Is this possible?