@jordyvd/pi-image-attachments
Image attachments for Pi, including draft placeholders and screenshot tool-result promotion.
Package details
Install @jordyvd/pi-image-attachments from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@jordyvd/pi-image-attachments- Package
@jordyvd/pi-image-attachments- Version
0.1.1- Published
- Mar 17, 2026
- Downloads
- 53/mo · 18/wk
- Author
- jordymvd
- License
- MIT
- Types
- extension
- Size
- 20.8 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@jordyvd/pi-image-attachments
A distributable Pi extension package that brings image attachment behavior to Pi without any external runtime dependency beyond Pi itself.
Features
Ctrl+Vclipboard images attach as draft images instead of leaving temp-file paths in the editor.- Dragging or pasting a local image path into the editor attaches it.
- Draft images are shown as
[Image #N]placeholders. - Placeholders are stripped from the submitted text; only the image content is sent.
- Drafts containing only image placeholders are sent as image-only user messages.
- Screenshot tool results that save to
filePathare promoted into inline image content so the agent can inspect them agentically. - The extension nudges Pi to prefer inline screenshots when the agent needs to inspect the image itself.
Install
From npm (recommended):
pi install npm:@jordyvd/pi-image-attachments
From source:
git clone https://github.com/jordyvandomselaar/pi-image-attachments.git
pi install ./pi-image-attachments
Try without installing:
pi -e npm:@jordyvd/pi-image-attachments
You can also point Pi at a local checkout while developing the extension.
Package structure
This package uses Pi's pi.extensions manifest in package.json, so Pi can load it from npm, git, or a local path.
Tests
bun test
bun test --coverage --coverage-reporter=text --coverage-reporter=lcov