Removing transparent background

I’m trying to display images with transparent backgrounds. st.image displays the entire image, regardless of whether the background is transparent or not. Here’s a simple example of my code:

class Redirect:
    def __init__(self, name, icon, link):
        st.image(icon)
        st.link_button(f"Redirect to {name}", link)

youtube = Redirect("YouTube", "./Website icons/youtube.png", "https://youtube.com")

This is youtube.png
download (2)

It displays this in the website
image

Is it possible to remove the transparent background? Huge thanks in advance!

There is nothing transparent in your picture.

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