mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #12192] [MERGED] feat: adjust jpeg compression quality to 0.15 for avatar uploads #61718
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/12192
Author: @Ithanil
Created: 3/30/2025
Status: ✅ Merged
Merged: 3/31/2025
Merged by: @tjbck
Base:
dev← Head:avatar_compression📝 Commits (1)
7f5dc22adjust jpeg compression quality to 0.15 for avatar uploads📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
src/lib/components/chat/Settings/Account.svelte(+2 -1)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
The jpeg compression quality for new avatar image uploads is adjusted down to 0.15 (used default before), which is enough to prevent significant visible artifacts and significantly reduces the base64 encoded image string that is written to the user's row in the user table. This prevents unnecessary database size and should only help performance, if anything.
Changed
Additional Information
Existing avatars are not changed, they would have to be reuploaded to be affected.
For the following testing image from https://upload.wikimedia.org/wikipedia/commons/f/fd/Angela_Merkel_%282008%29.jpg
the resulting base64 string was (~32kB)
before and now is (~4kB)
Going lower in quality (e.g. 0.1) would further reduce size but then you start seeing artifacts if you look closely.
Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.