Add option to disable automatic image attachment from file paths
When I paste an absolute path to an image file (e.g. /Users/me/project/assets/hero.png) in the CLI input, Claude Code automatically reads and attaches the image inline.
The problem: Sometimes I want to give Claude the path as text, not the image itself. For example, when referencing image paths for use in HTML/CSS, discussing file organization, or pointing Claude to assets it should use in code. Wrapping in quotes or backticks doesn't prevent attachment either.
There's also an efficiency concern. Auto-attaching images consumes context window with image data when all I needed was for Claude to know the file path string.
Proposed solution: A setting to disable auto-image-attachment from file paths, something like:
{
"autoAttachImages": false
}
When disabled, image paths would be treated as plain text. Users could still explicitly ask Claude to read an image via the Read tool when they actually want visual analysis.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗