Add option to disable image resize #6777
unameisfine
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment 1 reply
-
This is by design so I renamed your title and moved to feature requests & suggestions, thanks for checking out LibreChat. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Description
Images generated by AI models (Stable Diffusion, DALL-E) are being forcibly resized to a maximum of 768px on the shorter dimension, despite being generated at larger sizes (e.g., 1024x1024).
Current Behavior
When generating images using Stable Diffusion or DALL-E:
The model correctly generates images at the requested size (e.g., 1024x1024)
The metadata in the API response correctly shows dimensions (width: 1024, height: 1024)
However, the saved/displayed image is resized to have the shorter dimension at max 768px
Expected Behavior
AI-generated images should maintain their original dimensions throughout the processing pipeline, without being forcibly reduced in size.
Root Cause
The issue is in /api/server/services/Files/images/resize.js in the resizeImageBuffer function:
This code enforces a maximum dimension of 768px for the shorter side, even for high-quality AI-generated images that were originally created at larger sizes.
Affected Components
Stable Diffusion agent tool integration
DALL-E agent tool integration
Any other AI image generation tools that use the same image processing pipeline
Version Information
ghcr.io/danny-avila/librechat-dev latest 58d67aa9824f 2 days ago 921MB
ghcr.io/danny-avila/librechat-rag-api-dev-lite latest b6c0af65c3c1 3 days ago 1.31GB
ghcr.io/danny-avila/librechat-dev 2cb7bd98cf9f 9 days ago 913MB
ghcr.io/danny-avila/librechat-rag-api-dev-lite dd05389daecc 11 days ago 1.31GB
ghcr.io/danny-avila/librechat-dev 2947f02d5e16 3 weeks ago 876MB
ghcr.io/danny-avila/librechat-dev 9db00ed eb1b76b0cb49 4 weeks ago 872MB
ghcr.io/danny-avila/librechat-rag-api-dev-lite 6550e7ddf180 4 weeks ago 1.3GB
ghcr.io/danny-avila/librechat-dev 1b9c21d30199 5 weeks ago 881MB
ghcr.io/danny-avila/librechat-dev 6bbd1c9589e3 6 weeks ago 867MB
ghcr.io/danny-avila/librechat-rag-api-dev-lite 095db2c2ff3b 3 months ago 1.29GB
Steps to Reproduce
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions