When the image is out of range ( st.colimns, image)

import streamlit as st

c1, c2, c3 = st.columns([1,1,1])

with c1:
    st.write("C1")
    st.markdown('[![gift](https://cdn.pixabay.com/photo/2021/11/29/15/01/christmas-6832802_960_720.jpg)](https://share.streamlit.io/)')

with c2:
    st.write("C2")
    st.markdown('[![gift2](https://cdn.pixabay.com/photo/2021/12/20/16/28/moose-6883432_960_720.jpg)](https://share.streamlit.io/)')

with c3:
    st.write("C3")
    st.markdown('[![gift3](https://cdn.pixabay.com/photo/2022/12/18/11/45/christmas-7663229_960_720.jpg)](https://share.streamlit.io/)')
    

I would like to include a link to an image. However, the picture is out of range.

can’t I use width options like st.image here?

Thank you for always.

You can just do html directly:

st.markdown('<a href="https://share.streamlit.io/"><img src="https://cdn.pixabay.com/photo/2022/12/18/11/45/christmas-7663229_960_720.jpg" width="100%"></a>', unsafe_allow_html=True)

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.