Image attachments should expose the file path to the agent, not just pixel data
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
When attaching an image file (.jpg, .png, .webp, etc.) via drag&drop from the explorer to a Copilot Chat prompt, the agent receives only the pixel data (base64-encoded image), but not the file path of the source file.
This is inconsistent with how other file types (.md, .ts, .jsx, etc.) behave, where the full filePath is included in the attachment metadata and is accessible to the agent.
Expected behavior:
When a user attaches a local image file, the agent should receive both the pixel data and the source file path — just like text file attachments.
Actual behavior:
The agent receives pixel data only. There is no file path available, making it impossible for the agent to copy, reference, or work with the image file programmatically (e.g., Copy-Item ).
Impact:
This creates a confusing user experience. Users naturally expect that attaching an image works the same way as attaching any other file. Without the path, the agent cannot integrate the image into a project without the user manually saving it to disk and providing the path separately.
Suggested fix:
Include the filePath in the image attachment metadata when the image originates from a local file on disk (as opposed to a screenshot or clipboard paste).
Contributor guide
Assessment
This issue has not been assessed yet.