[GH-ISSUE #11934] feat: Large Base64-Encoded Images in model.meta Cause Performance Problems #55073

Closed
opened 2026-05-05 17:06:59 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @derevyan on GitHub (Mar 21, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11934

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Issue Description
Currently, when creating an agent and uploading an avatar, the uploaded image (in base64 format) is stored directly in the database within the model table’s meta column. This leads to significant performance issues and bloated table size, especially if users upload large images (potentially in the megabytes). For instance, retrieving a list of all models requires fetching all these large base64-encoded images from the database, which slows down query times and overall system performance.

Steps to Reproduce
1. Create a new agent in the system.
2. Upload a large image (several megabytes in size) as the agent’s avatar.
3. Fetch or list all models in the system.
4. Notice the extended response times and increased table size in the database due to the embedded base64 images.

Expected Behavior
• The system should quickly retrieve model information without incurring large overhead from image data.
• Images should be stored or served in a more performant manner that does not bloat the main table.

Actual Behavior
• Because full base64 image data is stored in model.meta, the database table can quickly grow to multiple megabytes.
• Any operation that fetches multiple models is slowed down due to large payloads from base64 images.
• Overall performance suffers and queries take longer than necessary.

Desired Solution you'd like

Proposed Solutions
1. Separate File or Object Storage
• Move images out of the meta column and store them in a dedicated file or object storage service (e.g., AWS S3, a file system, or a dedicated image service).
• Keep only a reference/URL in the model table instead of the full base64 data.
2. Image Preprocessing and Resizing
• Process and resize images before storing.
• Generate thumbnail/optimized versions to reduce file size.
• Store multiple resolutions if needed, rather than the full high-resolution image.
3. Set Max Allowed Image limit and not allow users upload this crap

Thank you !

Alternatives Considered

No response

Additional Context

No response

Originally created by @derevyan on GitHub (Mar 21, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11934 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Issue Description Currently, when creating an agent and uploading an avatar, the uploaded image (in base64 format) is stored directly in the database within the model table’s meta column. This leads to significant performance issues and bloated table size, especially if users upload large images (potentially in the megabytes). For instance, retrieving a list of all models requires fetching all these large base64-encoded images from the database, which slows down query times and overall system performance. ⸻ Steps to Reproduce 1. Create a new agent in the system. 2. Upload a large image (several megabytes in size) as the agent’s avatar. 3. Fetch or list all models in the system. 4. Notice the extended response times and increased table size in the database due to the embedded base64 images. ⸻ Expected Behavior • The system should quickly retrieve model information without incurring large overhead from image data. • Images should be stored or served in a more performant manner that does not bloat the main table. ⸻ Actual Behavior • Because full base64 image data is stored in model.meta, the database table can quickly grow to multiple megabytes. • Any operation that fetches multiple models is slowed down due to large payloads from base64 images. • Overall performance suffers and queries take longer than necessary. ### Desired Solution you'd like Proposed Solutions 1. Separate File or Object Storage • Move images out of the meta column and store them in a dedicated file or object storage service (e.g., AWS S3, a file system, or a dedicated image service). • Keep only a reference/URL in the model table instead of the full base64 data. 2. Image Preprocessing and Resizing • Process and resize images before storing. • Generate thumbnail/optimized versions to reduce file size. • Store multiple resolutions if needed, rather than the full high-resolution image. 3. Set Max Allowed Image limit and not allow users upload this crap Thank you ! ### Alternatives Considered _No response_ ### Additional Context _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#55073