[BUG] Image quality degradation
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When Claude Code reads image files (PNG, JPG, WebP) using the Read tool, the images are being recompressed/re-encoded. The file size and visual quality change compared to the original file on disk.
Real-world impact: I work with images that get used on a website. When I have Claude Code read/process images as part of my workflow (e.g. reviewing assets, comparing variants, picking final versions), the version Claude sees and operates on is already degraded. By the time the image lands on the web, it has been recompressed at least once by Claude Code on top of any other pipeline compression — resulting in visible quality loss (artifacts around text, banding in gradients, softening of fine detail).
For anyone using Claude Code as part of an asset/content pipeline, this means:
Final web images are lower quality than the source files
Claude is making decisions (which crop, which variant, etc.) based on a degraded preview, not the actual asset
There's no warning or option to opt out
What Should Happen?
The Read tool should pass image bytes through losslessly, OR provide an explicit option to read the original file without re-encoding. If a size cap is necessary for the model context, it should:
Preserve the original file on disk untouched (this may already be true — but worth confirming)
Be transparent: report when an image has been downscaled/recompressed and by how much
Allow a --raw / lossless mode for image-pipeline workflows
Error Messages/Logs
Steps to Reproduce
- Save a high-quality PNG to disk, e.g. /tmp/source.png — note ls -la /tmp/source.png (file size) and dimensions
- In Claude Code: read /tmp/source.png
- Ask Claude to report the dimensions / size of what it received
- Compare against the original file on disk
- Observe: size and/or quality differ from the source
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.126
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗