diff --git a/backend/config.py b/backend/config.py index 4db04ea65..040a811ab 100644 --- a/backend/config.py +++ b/backend/config.py @@ -484,6 +484,19 @@ if CUSTOM_NAME: r.raw.decode_content = True shutil.copyfileobj(r.raw, f) + if "splash" in data: + url = ( + f"https://api.openwebui.com{data['splash']}" + if data["splash"][0] == "/" + else data["splash"] + ) + + r = requests.get(url, stream=True) + if r.status_code == 200: + with open(f"{STATIC_DIR}/splash.png", "wb") as f: + r.raw.decode_content = True + shutil.copyfileobj(r.raw, f) + WEBUI_NAME = data["name"] except Exception as e: log.exception(e) diff --git a/backend/static/splash.png b/backend/static/splash.png new file mode 100644 index 000000000..389196ca6 Binary files /dev/null and b/backend/static/splash.png differ diff --git a/src/app.html b/src/app.html index 8a650098d..a90859065 100644 --- a/src/app.html +++ b/src/app.html @@ -82,13 +82,13 @@ id="logo" style=" position: absolute; - width: 6rem; + width: auto; height: 6rem; top: 41%; left: 50%; margin-left: -3rem; " - src="/logo.svg" + src="/static/splash.png" />