bug(ui): Main logo resizes abnormally after replacing/loading custom SVG #43726
Bug descriptionBug DescriptionWhen replacing or loading a custom SVG, the main brand logo in the top navbar unexpectedly resizes and becomes overly large. Steps to Reproduce
Expected BehaviorThe main logo should retain its fixed width/height dimensions (defined via Actual BehaviorThe main logo stretches/enlarges, breaking the navbar alignment. Environment
this my conf: Will you support me? @dosu Screenshots/recordingsNo response Superset version6.1.0 Python version3.11 Node version16 BrowserChrome Additional contextNo response Checklist
|
Replies: 18 comments 1 reply
|
@murattkoc there are a few things going on here, and they're worth untangling separately. 1. 2. The oversized image is likely the loading spinner, not the navbar logo. These are two completely separate elements. The loading spinner ( What's most likely happening: your custom SVG referenced by 3. To fix this:
THEME_DEFAULT = {
"token": {
"brandSpinnerUrl": "/app/superset/static/assets/images/tvheryerde.svg",
"brandLogoUrl": "/app/superset/static/assets/images/tvheryerde.svg",
"brandLogoHeight": "24px",
}
}If the oversized element only appears briefly during page load and then the navbar looks normal, that confirms it's the spinner. If it persists after the app finishes loading, the issue is with the navbar logo rendering — let me know which scenario you're seeing and I can dig deeper. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Is changing the loading spinner normally a trouble-free process in v6? And could you share an example SVG loading image? @dosu |
|
Yes, changing the loading spinner in v6 is straightforward — it's a config-only change, no frontend rebuild required. A merged PR explicitly documents and tests this path [1]. How to do it: Add THEME_DEFAULT = {
"token": {
"brandSpinnerUrl": "/static/assets/images/my-custom-spinner.svg",
}
}Place your SVG (or GIF) at the corresponding static path and restart Superset. The custom image will appear during loading [1]. Sizing caveat: The frontend Loading component renders the spinner as an Things to be aware of:
Example minimal SVG spinner (square viewBox to scale cleanly): <svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
<circle cx="32" cy="32" r="26" stroke="#2893B3" stroke-width="6" fill="none"
stroke-linecap="round" stroke-dasharray="120 40">
<animateTransform attributeName="transform" type="rotate"
from="0 32 32" to="360 32 32" dur="1s" repeatCount="indefinite"/>
</circle>
</svg>Save that as e.g. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Can the issue where the main logo in the top-left corner gets distorted and enlarged in version 6.1.0 be fixed using the method you mentioned? Because I switched to The logo is distorted; the image is above. Could you tell me what I need to do for a step-by-step solution? |
|
@murattkoc Yes, the enlarged/distorted logo is fixable through theme configuration — no code changes needed. Here's what's happening and how to fix it step by step: Why the logo gets distorted: In Superset 6.x, the old Step-by-step fix:
THEME_DEFAULT = {
"token": {
"brandLogoUrl": "/static/assets/images/your-logo.svg",
"brandLogoAlt": "Your Company",
"brandLogoHeight": "24px", # fixed height; width auto-scales
"brandLogoMargin": "18px 0", # vertical spacing
"brandSpinnerUrl": "/static/assets/images/tvheryerde.svg",
}
}The built-in defaults are
The spinner and the logo use completely separate code paths — If the distortion persists after setting all the tokens above, could you share the opening To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
THEME_DEFAULT = { spinner is works but i recived full white page. Superset dont work. @dosu |
|
"brandLogoMargin": "18px 0" caused a white screen. @dosu |
|
`import os --- Branding ---APP_NAME = "Türksat Atlas" FAVICONS = [ THEME_DEFAULT = { BABEL_DEFAULT_LOCALE = 'tr' BABEL_TRANSLATION_DIRECTORIES = "/app/superset/translations" FEATURE_FLAGS = { } SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://superset:superset@postgres:5432/superset' REDIS_HOST = "redis" class CeleryConfig: CELERY_CONFIG = CeleryConfig EMAIL_REPORTS = True CELERY_ENABLE_UTC = False SMTP_HOST = "posta.turksat.com.tr" ALERT_REPORTS_NOTIFICATION_DRY_RUN = False Raporların içindeki linklerin doğru çalışması içinWEBDRIVER_BASEURL = "http://superset:8088/" WEBDRIVER_TYPE = "chrome" from superset.translations.utils import get_language_pack def bootstrap_overrides(bootstrap_data): COMMON_BOOTSTRAP_OVERRIDES_FUNC = bootstrap_overrides from flask_appbuilder.models.sqla.filters import FilterContains class SupersetPermissionViewMenuApi(PermissionViewMenuApi): class CustomSecurityManager(SupersetSecurityManager): CUSTOM_SECURITY_MANAGER = CustomSecurityManager from flask import g ------------------------------------------------------------------GEÇİCİ: OAuth2 credential'ları gelene kadar RLS için statikdeğerler kullanılır. OAuth2 devreye girdiğinde tek yapılacak:get_user_claim() fonksiyonunun gövdesini token/claim okuyacakşekilde güncellemek. RLS tanımları (Jinja şablonları) hiçdeğişmeyecek.------------------------------------------------------------------STATIC_CLAIMS = { def get_user_claim(claim_name: str, default: str = "-1") -> str: JINJA_CONTEXT_ADDONS = { my all superset_config.py file. @dosu |
|
Good catch — Root cause: When you define Adding This exact problem has been reported by other users on Superset 6.1.0 [3]. A fix (PR #41347) deep-merges partial theme overrides against the built-in defaults so omitted fields fall back safely. There are also follow-up fixes for What to do:
The rest of your config (custom security manager, bootstrap overrides, Jinja context, etc.) looks fine and shouldn't cause a white screen on its own. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Is there no solution to this now? APP_ICON = "/static/assets/images/turksat.png" THEME_DEFAULT = { The broken logo is here. |
|
@murattkoc there is a solution, but the approach you're using won't work as-is. Here's what's happening and how to fix it.
The real bug — partial THEME_DEFAULT = {
"token": {
"brandLogoHeight": "24px",
"brandSpinnerUrl": "/static/assets/images/my-spinner.svg",
}
}...you replace the entire theme dict, not just those two fields. Superset loads your config via This was fixed by PR #41347 (merged June 24, 2026), which deep-merges partial overrides with the built-in Fix — provide the full set of brand tokens: THEME_DEFAULT = {
"token": {
"brandLogoUrl": "/static/assets/images/turksat.png",
"brandLogoAlt": "Türksat",
"brandLogoHeight": "24px",
"brandLogoMargin": "18px 0",
"brandLogoHref": "/",
"brandIconMaxWidth": 37,
"brandSpinnerUrl": "/static/assets/images/my-spinner.svg",
},
"algorithm": "default",
}You can safely remove If you can pull a build that includes PR #41347, even a partial If the logo still looks distorted after setting all the tokens above, the issue may be the dimensions of To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Thanks for confirming — 1200×235 is a ~5.1:1 aspect ratio (very wide, short), which is not inherently a problem. Here's what's happening in the code and what to try: The navbar renders your logo inside a With The distortion you're seeing is most likely because one or more of those tokens ( What to try:
Could you share a screenshot of how it renders with the fully explicit To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
Changes have begun to happen.
logo is blurry. @dosu |
|
Good to see progress! The blurriness is almost certainly a raster-scaling artifact rather than a Superset bug. Here's what's happening and how to fix it: The navbar renders the logo with Best fix — use an SVG instead of a PNG. SVGs stay crisp at any size since they're vector-based. The THEME_DEFAULT = {
"token": {
"brandLogoUrl": "/static/assets/images/turksat-logo.svg",
"brandLogoHeight": "24px",
},
}If SVG isn't available, try these:
Do you have an SVG version of the Türksat logo? That would be the cleanest path to a crisp result. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
THEME_DEFAULT = { its work for my. Too thanks. I'm so glad to have you @dosu |
|
Awesome, glad to hear it's working for you, @murattkoc! 🎉 Happy to help anytime — feel free to reach back if anything else comes up. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Looks like ti's working so going to close this out as resolved. |


Thanks for confirming — 1200×235 is a ~5.1:1 aspect ratio (very wide, short), which is not inherently a problem. Here's what's happening in the code and what to try:
The navbar renders your logo inside a
Typography.LinkwithclassName="navbar-brand". Whentheme.brandLogoUrlis set, the wrapper gets an inline style withheight: theme.brandLogoHeight(andminHeight: '0px'), but no explicit width on the<img>[1]. The.navbar-brandCSS rule providesmax-width: ${theme.sizeUnit * theme.brandIconMaxWidth}pxandimg { height: 100%; object-fit: contain; }[2], which should constrain and aspect-preserve your logo correctly.With
sizeUnit: 4andbrandIconMaxWidth: 37, the container caps at148px…