feat: make avatar size configurable via config.toml#2816
Merged
hayescode merged 4 commits intoChainlit:mainfrom Mar 5, 2026
Merged
feat: make avatar size configurable via config.toml#2816hayescode merged 4 commits intoChainlit:mainfrom
hayescode merged 4 commits intoChainlit:mainfrom
Conversation
Add avatar_size option to [UI] in config.toml. When set, the avatar renders at the specified pixel size instead of the default 20x20px.
|
Thanks a million! I literally just dealt with this issue a couple of days ago, and out of nowhere, here is your solution |
hayescode
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add
avatar_sizeoption to[UI]section in config.toml to configure the message avatar size.Closes #2743
Why
The avatar is hardcoded to 20x20px, making custom logos and detailed avatars difficult to see clearly.
Changes
backend/chainlit/config.py: Addavatar_size: Optional[int] = NonetoUISettingsand add commented-out option in TOML templatefrontend/src/components/chat/Messages/Message/Avatar.tsx: Useconfig.ui.avatar_sizefor inline style when set, falling back to default Tailwind classes (h-5 w-5)Usage
Testing
When
avatar_sizeis not set, the avatar renders at the default 20x20px (backward compatible). When set, inline styles override the default.Summary by cubic
Make message avatar size configurable via config.toml so teams can use larger logos or detailed avatars. Defaults to 20px to keep behavior unchanged.
Written for commit 3dfe61a. Summary will update on new commits.