VS Code extension: Image drag-and-drop fails on Apple Silicon — sharp module not loaded

Resolved 💬 5 comments Opened Mar 27, 2026 by lasthalf Closed Apr 29, 2026

Description

Dragging an image into the Claude Code VS Code extension fails on Apple Silicon Macs when the image exceeds 2000px in either dimension. The extension attempts to auto-resize using sharp, but the darwin-arm64 native module fails to load.

The same images work fine in the CLI and desktop app.

Steps to Reproduce

  1. Use Claude Code VS Code extension on an Apple Silicon Mac (extension v2.1.86)
  2. Drag an image into the conversation (e.g., 2155x1295 screenshot)
  3. Error is thrown and the image is rejected

Error

Error: Claude Code returned an error result: Unable to resize image — dimensions exceed the
2000x2000px limit and image processing failed. Please resize the image to reduce its pixel dimensions.;
Error: Could not load the "sharp" module using the darwin-arm64 runtime Possible solutions:
- Ensure optional dependencies can be installed: npm install --include=optional sharp
- Ensure your package manager supports multi-platform install: See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies: npm install --os=darwin --cpu=arm64 sharp
- Consult the installation documentation: See https://sharp.pixelplumbing.com/install

Notes

  • The 2000px per-dimension limit is much stricter than the API's 8000x8000 limit. With sharp broken, there's no way to use any image over 2000px in either dimension.
  • The CLI and desktop app handle these images without issue, suggesting they either bundle sharp correctly or use a different resizing approach.

Environment

  • macOS (Apple Silicon / darwin-arm64)
  • Claude Code VS Code extension v2.1.86

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗