mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
Enhance Image Compression with More Flexible and Granular Options #4137
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?
Originally created by @GN998 on GitHub (Feb 25, 2025).
Dear OpenWebUI Developers,
Hello! I'm a photographer, and I've found the image compression feature in OpenWebUI to be very useful. However, the current compression options don't express resolution accurately enough when dealing with portrait and long images. To improve the user experience, I suggest the following optimizations to the image compression functionality:
Problem:
The current resolution representation (A×B) is not intuitive for portrait and long images, making it difficult for users to accurately control the dimensions of the compressed image.
The existing compression schemes are relatively limited, preventing users from making finer adjustments based on specific needs.
Proposed Improvements:
Improved Resolution Representation:
In addition to the A×B representation, add more intuitive options, such as:
Longest Side Pixel: The user specifies the pixel value for the longest side of the image, and the program automatically scales the other side proportionally.
Total Pixel Count: The user specifies the maximum total number of pixels for the image, and the program automatically adjusts the aspect ratio.
For portrait and long images, provide a "Keep Original Aspect Ratio" option.
Add Two Compression Schemes:
Scheme 1 (Simple and Fast):
Max File Size: The user sets the maximum file size of the compressed image (e.g., 2MB).
Total Pixel Limit: Set an upper limit on the total number of pixels in the image (to prevent excessively large images).
Scheme 2 (Fine-Grained Control):
Max File Size: The user sets the maximum file size of the compressed image.
Lossy Compression Quality: Provide a compression quality option (e.g., a slider from 1-100).
Color Space: The color space of the compressed image (sRGB).
Bit Depth: bit depth of compressed image (8bit)
Total Pixel Limit: Set an upper limit on the total number of pixels in the image (optional).
Benefits:
More flexible size control, making it easier for users to handle images of various aspect ratios.
Provides more granular compression options to meet the needs of different scenarios.
Improves user experience, making the image compression feature easier to use and more powerful.
I hope these suggestions are helpful to the OpenWebUI project.