dsh-image-resizer

August 24, 2026 ยท View on GitHub

A small client-only plugin for DeepSeek Harness Web. It proportionally downsizes oversized conversation images before DSH's native attachment admission, so ordinary Retina/full-screen screenshots can be pasted or dropped without changing DSH core limits.

Behavior

  • PNG, JPEG, and WebP images with a side above 2000px are resized in the browser.
  • Aspect ratio, file name, media type, and lastModified metadata are preserved.
  • Images already within the limit are passed through without re-encoding.
  • GIF and unsupported image types are not transformed, avoiding animation loss or silent format conversion.
  • If browser decoding/encoding fails, the original image is replayed into DSH so the native validation/error path remains authoritative.
  • Paste text accompanying an image is inserted immediately at the original caret; normalized files follow asynchronously.
  • All listeners are owned by the Cordis client fiber and are removed when the plugin stops.

Install

git clone https://github.com/HaijieChen/dsh-image-resizer.git
cd dsh-image-resizer
pnpm install
pnpm test
pnpm build
dsh plugin --profile web add link:$(pwd)
# Restart the existing dsh web process normally, then refresh its page.

The plugin does not modify DSH source, attachment storage, model routes, or the Host's maxImageDimension policy.