dshx-image-clamp: Resizing the image long side to within 2000px before sending to the model

dshx-image-clamp is a DSH model inference plugin maintained by callaumyan-design. When Claude receives a single request containing more than 20 images, if any image has a side length exceeding 2000px, the entire package will be rejected; DSH attachment normalization does not guarantee a single-side limit. This plugin wraps `attachments.readImage` to scale down the longest side to `maxSide` (default: 2000) and limit encoded bytes to `maxBytes` (default: 180KB) before sending to any provider, without modifying the original image on disk. It supports web, desktop, and headless environments and requires a restart after installation. It is compatible with DSH 0.2.0-rc.2 and is released under the MIT license.

Read More