Skip to main content

Streamlit imagegrid

Project description

Streamlit ImageGrid plugin


pip install streamlit-imagegrid

Example Usage

zoom allows for increasing and decreasing the height of image grid images. urls takes in html or disk urls with absolute path. height Height of IFrame.

import streamlit as st
from streamlit_imagegrid import streamlit_imagegrid
import requests
from PIL import Image
from io import BytesIO

st.title('Image grid test')
zoom_val = st.sidebar.slider('Zoom',40,240)

urls = [
          "width": 1000,
          "height": 666,
          "src": ""
          "width": 1000,
          "height": 422,
          "src": ""
          "width": 1000,
          "height": 666,
          "src": ""

return_value = streamlit_imagegrid(urls=just_urls,zoom=zoom,height=1000)

if return_value is not None:
    response = requests.get(return_value)
    st.sidebar.markdown('<img src={} width=240px></img>'.format(return_value),unsafe_allow_html=True)

Supported URL's Format

URL's can be on disk files with absolute path or any http/https image urls. if you would like video support contact the developer.

Case 1

In this case if width and height are NOT provided auto align and resize and nice image flow will not work. (Yet)

urls = [ { "width": 1000, "height": 666, "src": "" }, { "width": 1000, "height": 422, "src": "" }, { "width": 1000, "height": 666, "src": "" } ]

Case 2

Single url list. This works but no auto align with nice image flow. Resiging does not fix the page. Next version of streamlit-imagegrid will support automatic resizing of url-only inputs.

urls = ["", "", "", "", "", ""]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for streamlit-imagegrid, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size streamlit_imagegrid-0.0.4.macosx-10.9-x86_64.tar.gz (819.8 kB) File type Source Python version None Upload date Hashes View
Filename, size streamlit_imagegrid-0.0.4-py3-none-any.whl (832.3 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page