Issue Custom Superset Image creation
Bug description
#Change in superset_config.py
Change 1:
APP_NAME = "OGOS" APP_ICON = "/static/assets/images/superset-logo-horiz.png" FAVICONS = [{"href": "/static/assets/images/favicon.png"}] loading_icon = "/static/assets/images/loading.gif" LOGO_TARGET_PATH = "/"
Change 2:
superset_test: build: context: . dockerfile: Dockerfile image: apache/ogos:test container_name: superset_app_test user: root depends_on: - db_test - redis_test environment: SUPERSET_SECRET_KEY: "change_this_to_a_secure_key_test" # this is the key, do not change it. SUPERSET_SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset_test:superset_test_pwd@db_test:5432/superset_test SUPERSET_ENV: production ports: - "8091:8088" volumes: - superset_test_home:/app/superset_home - ./superset_config_test.py:/app/pythonpath/superset_config.py command: > /bin/bash -c " pip install --no-cache-dir psycopg2-binary && superset db upgrade && superset init && /usr/bin/run-server.sh " restart: unless-stopped
#Change in Dockerfile
#stage1 FROM node:20-bookworm AS frontend-builder
RUN apt-get update && apt-get install -y
git
libzstd-dev
zstd
python3
make
g++
&& rm -rf /var/lib/apt/lists/*
WORKDIR /superset
RUN git clone --branch 6.0.0 https://github.com/apache/superset.git .
WORKDIR /superset/superset-frontend
RUN mkdir -p src/assets/images/brand
COPY fdos_loader.gif src/assets/images/brand/ogos_loader.gif COPY fdos_logo_trans.png src/assets/images/brand/ogos_logo_trans.png COPY fdos_favicon.png src/assets/images/brand/ogos_favicon.png
RUN cp src/assets/images/brand/ogos_loader.gif src/assets/images/loading.gif RUN cp src/assets/images/brand/ogos_logo_trans.png src/assets/images/superset-logo-horiz.png RUN cp src/assets/images/brand/ogos_favicon.png src/assets/images/favicon.png
RUN npm ci RUN npm run build
#stage2 FROM apache/superset:6.0.0
USER root
RUN pip install --no-cache-dir psycopg2-binary
COPY --from=frontend-builder
/superset/superset/static/assets
/app/superset/static/assets
USER superset
I am trying to build a custom superset image with my logo, favicon, loading. i have put the files in root folder and used this Dockerfile and docker-compose.yml it works fine. My logo works perfectly fine, Now the issue comes here is when i checked the dev tools still the pre built loading.gif and favicon.png are still not replace.
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Superset 6.0.0/master recently changed how the loading spinner works: it now uses an animated SVG by default and lets you set a custom image via the theme token brandSpinnerUrl—replacing loading.gif directly may no longer have any effect. To use your own loading image, set brandSpinnerUrl in your theme config to the path of your custom GIF or PNG (for example, /static/assets/images/ogos_loader.gif). See the merged PR for details.
For the favicon, Superset still uses the FAVICONS config in superset_config.py, which is rendered in the HTML head. Make sure your custom favicon is present in the built static assets and referenced correctly in the config. If you still see the old favicon or spinner, clear your browser cache and localStorage—browsers cache these assets aggressively.
Also, Superset 6.0.0+ requires Node 20.x for frontend builds; using Node 16 can cause missing assets or build failures. Double-check your Dockerfile and build steps to ensure your custom images are copied before running the frontend build, and that the build completes successfully. If you follow these steps, your custom branding should appear as expected.
References:
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
i used this too but it is not changing--
THEME_DEFAULT = { "algorithm": "default", "token": { # Typography – Global Default "fontFamily": "Inter, sans-serif", "fontUrls": [ "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap" ],
# Heading Font Sizes
"fontSizeHeading1": 40,
"fontSizeHeading2": 32,
"fontSizeHeading3": 26,
"fontSizeHeading4": 22,
"fontSizeHeading5": 18,
# Line Heights (Global + Headings)
"lineHeight": 2,
"lineHeightHeading1": 1.5,
"lineHeightHeading2": 1.38,
"lineHeightHeading3": 1.26,
"lineHeightHeading4": 1.12,
"lineHeightHeading5": 1,
# Semantic Colors
"colorSuccessBg": "#5ac189",
"colorWarningBg": "#B12CFE",
"colorErrorBg": "#ff6b6b",
"brandIconMaxWidth": 150,
"brandLogoHeight": "40px",
"brandLogoMargin": "10px 10px 10px 0px",
"brandLogoUrl": "/static/assets/images/superset-logo-horiz.png",
"brandSpinnerUrl": "/static/assets/images/loading.gif"
}
}
As my Dockerfile is already having this-- COPY fdos_loader.gif src/assets/images/brand/ogos_loader.gif COPY fdos_logo_trans.png src/assets/images/brand/ogos_logo_trans.png COPY fdos_favicon.png src/assets/images/brand/ogos_favicon.png
RUN cp src/assets/images/brand/ogos_loader.gif src/assets/images/loading.gif RUN cp src/assets/images/brand/ogos_logo_trans.png src/assets/images/superset-logo-horiz.png RUN cp src/assets/images/brand/ogos_favicon.png src/assets/images/favicon.png
But there is no change in either favicon or loading spinner!
A few things to check:
-
Superset only loads the theme config from THEME, not THEME_DEFAULT. Make sure you assign your theme dictionary to THEME in superset_config.py, like:
THEME = { "algorithm": "default", "token": { # ... your tokens ... "brandSpinnerUrl": "/static/assets/images/loading.gif", } }Otherwise, your custom spinner and logo won't be picked up by the frontend. Reference
-
If you've ever used the theme editor or loaded Superset before, your browser's localStorage may have a saved theme that overrides the config. Clear localStorage (look for the key
superset-theme) and refresh the page. Reference -
For the favicon, make sure your FAVICONS config in superset_config.py points to the correct path and that the file exists in the built static assets. The favicon is rendered from this config in the HTML head. Reference
-
Superset 6.0.0+ requires Node 20.x for frontend builds. Using Node 16 can cause missing or outdated assets. Reference
-
After rebuilding, clear your browser cache to ensure you aren't seeing cached assets.
If you follow these steps and still don't see your custom spinner or favicon, use your browser's dev tools (Network tab) to check which asset paths are being loaded and verify that your custom files are present in the container at /app/superset/static/assets/images/.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Did the bot resolve this? If so, please close, but if not, please recap how we can reproduce this or better address it in docs.