Image Annotator is a powerful VS Code extension designed to bridge the gap between visual context and code. Whether you're reporting a UI bug, documenting a complex architecture diagram, or asking AI for help with a visual layout, Image Annotator makes it seamless.
Paste any image from your clipboard and start annotating immediately.
- Draw: Pen tool for freehand sketches.
- Highlight: Arrows, Rectangles, and Circles to point out details.
- Context: Add Text labels to explain your thoughts.
- Sequence: Use the Counter tool (
#) to create step-by-step flows (1, 2, 3...). - Privacy: Redact sensitive info with the Pixelate/Blur tool.
Don't just draw—ask. Integrated with Google's Gemini AI (2.5 Flash), you can:
- Find Bugs: Highlight a UI glitch and ask AI "Why does this look wrong compared to standard Material Design?"
- Explain Code: Paste a diagram of an architecture and ask "Explain this data flow."
- Generate Code: Paste a screenshot of a UI element and ask "Generate the React/Tailwind code for this component."
- Your images are processed locally for drawing.
- AI analysis is performed via your own personal API Key.
- Your API Key is stored securely in VS Code's encrypted secret storage/settings and is never exposed to the webview or third parties.
Install "Image Annotator" from the VS Code Marketplace or download the .vsix from releases.
To use AI features, you need a Gemini API Key:
- Get a free key at Google AI Studio.
- In VS Code, open Settings (
Ctrl+,) and search forImage Annotator. - Paste your key into the Gemini Api Key field.
- Open: Press
Ctrl+Shift+Pand runAnnotate Image, or right-click in any editor. - Add Image: Paste (
Ctrl+V) or use the Upload button. - Analyze: Click Ask AI to get insights from Gemini.
Follow these steps to build the extension from source.
git clone https://github.com/onel0p3z/image-annotator.git
cd image-annotator
npm install
cd vscode-extension && npm install && cd ..The annotator UI is a React app. It must be built into a single file for the extension to consume:
npm run buildThis generates vscode-extension/webview-dist/index.html.
Compile the TypeScript extension host code:
cd vscode-extension
npm run compile- Open the root folder in VS Code.
- Press
F5to launch a new Extension Development Host window. - In the new window, use the command
Annotate Imageto test your changes.
To create a .vsix file for manual installation:
cd vscode-extension
vsce packageEnjoy building with visual context!


