Fav Icon & Title Customization

It would be nice to be able to change the FavIcon and Title for Streamlit apps

Hello @Bobby,

Well actually you can :slight_smile: see the set_page_config method.

    st.set_page_config(
        page_title="Hello world",
        page_icon="chart_with_upwards_trend",
        layout="wide",
    )

Cheers,
Fanilo

2 Likes

I’ve tried that, but it still shows Streamlit in the title. It also temporarily shows “Streamlit” before loading custom title.

The favicon you can only set predefined icons.

image

Yeah it’s a known issue, there are some workarounds in this issue, it does involve tampering with the Streamlit install:

It accepts Twemoji icons but it should also accept types supported by st.image.

EDIT: loading a favicon and displaying it works for me:

from PIL import Image
import streamlit as st

im = Image.open("favicon.ico")
st.set_page_config(
    page_title="Hello",
    page_icon=im,
    layout="wide",
)

Fanilo

I will give the FavIcon a try, I didn’t know you could use Image that would work for me.