🖼️ streamlit-image-select: An image select component for Streamlit

Hey all :wave:

I created a new component recently. It shows an image gallery, lets the viewer select an image, and returns the selected image on the Python side. Very useful if you want to show some example images in a computer vision app!

Check it out and let me know what you build!


This is Great! I was waiting for this functionality for so long, thanks for sharing @jrieke !!

1 Like

Looks super cool! And you added it to the tracker, that’s awesome :smiling_face_with_tear:

1 Like

@jrieke Nice design! But do you know how can I center these images in sidebar and change the size of these images? I would really appreciate your help!

images = [“xx.png”, “xxx.png”]

with st.sidebar:
clicked = image_select(“”, images, key=‘click_images’)

Is there a way to select and return info for multiple images? For instance, load five images on a page, select two of them and then return associated info for the two. Thanks! and nice job!

@junchi @rnobalr Thanks for the suggestions! Both things (changing alignment/size + multi-selection) are currently not implemented. Can you open Github issues on the repo? I currently don’t have plans or time to work on this but let’s track it on Github, so I can come back to it when I do have time!

1 Like

@junchi I just added a parameter use_container_width in v0.3, which lets you stretch the width of the images to the container width. Does that already work for you to display them properly in the sidebar? If not, feel free to still open that Github issue and describe exactly what you want (mocks/screenshots would help!).

1 Like

This is great, thanks for sharing!