Version: 2.0.23
Describe the Bug
In imageDownscale.ts, only JPEG input is re-encoded as JPEG (quality 0.92); PNG and WebP are written back out as PNG to stay lossless.
With the default "Max image size" of 2048 px, a 5120x5120 PNG is correctly downscaled, but the resulting PNG is still over 10 MB, so it is rejected by the size check with image.png exceeds the 10MB limit.
Since the vision tower resamples to a fixed resolution anyway, keeping a lossless PNG doesn't buy any accuracy — it only inflates the base64 payload and the context. Encoding to JPEG when the image has no alpha channel, or producing both and keeping the smaller one, would avoid this.
Steps to Reproduce
- Keep "Max image size" at the default 2048 px.
- Prepare a detailed 5120x5120 PNG (mine is 23.3 MB).
- Copy it to the clipboard and paste it into the chat input.
- It is rejected with "image.png exceeds the 10MB limit", even though it was downscaled to 2048 px first.
Screenshots / Logs
Operating System
Version: 2.0.23
Describe the Bug
In
imageDownscale.ts, only JPEG input is re-encoded as JPEG (quality 0.92); PNG and WebP are written back out as PNG to stay lossless.With the default "Max image size" of 2048 px, a 5120x5120 PNG is correctly downscaled, but the resulting PNG is still over 10 MB, so it is rejected by the size check with
image.png exceeds the 10MB limit.Since the vision tower resamples to a fixed resolution anyway, keeping a lossless PNG doesn't buy any accuracy — it only inflates the base64 payload and the context. Encoding to JPEG when the image has no alpha channel, or producing both and keeping the smaller one, would avoid this.
Steps to Reproduce
Screenshots / Logs
Operating System