插件目录 / Developer / dsh-picture-fit
dsh-picture-fit
已验证 · 实测可装 cyanfish-x
功能简介
DSH plugin + Agent Skill: auto-fit oversized images with sharp before attachment admission
可用 — 实测通过,早期项目
DSH plugin + Agent Skill: auto-fit oversized images with sharp before attachment admission 实测能干净安装、正常启动。早期项目,但功能可用。
「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。
README
dsh-picture-fit
中文 | English
dsh图片大小自动压缩预处理插件,解决dsh聊天框携带过大图片时,调用 deepseek-v4-flash-vision-exp 模型报错的问题;
粘贴 / 拖拽 / 选文件插入图片时,插件会把超限大图自动缩边压缩,避免「图片宽高不能超过 2000px」被拒。同仓附带跨 Agent 的 Skill(Codex / Claude Code / Cursor 等)。
问题描述
粘贴超限大图时,dsh会直接拒绝:

- DSH 默认拒绝单边 >2000px 的图。
- DeepSeek Vision 官方单边上限更高(8192 / 多图时 4096),见 图像理解 · 限制。
- 宿主选择拒绝而非自动缩图;本插件补上自动 fit。
安装(DSH Web)
提示词安装(推荐)
把下面整段复制发给任意 Agent,让它代为安装:
请帮我安装 DSH 插件 dsh-picture-fit(超限图片自动缩边压缩):
1. 确认本机已安装 dsh CLI,且能执行 `dsh --help`
2. 执行:dsh plugin --profile web add github:cyanfish-x/dsh-picture-fit
3. 安装成功后提醒我重启 dsh web(或帮我重启,若你能操作该进程)
4. 安装完成后说明:设置 → 图片压缩 可开关与覆盖最大边长
仓库:https://github.com/cyanfish-x/dsh-picture-fit
命令行安装
dsh plugin --profile web add github:cyanfish-x/dsh-picture-fit
重启 dsh web。
设置
入口:设置 → 图片压缩。

| 配置 | 默认 | 说明 |
|---|---|---|
enabled |
true |
超限时自动缩边 |
maxDimension |
null(跟宿主) |
覆盖最大边长;宿主常见为 2000 |
enabled: false 时与官方拒绝超限图行为一致。只存缩后图;不碰 MCP / 其他插件自管图。
Agent Skill
见 skill/SKILL.md。仓库内:
npm install
node skill/scripts/fit.mjs ./big.png ./big.fit.png --max 2000
许可
MIT。依赖 sharp(Apache-2.0)。
安装
装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:
dsh plugin add dshbase-catalog 然后对 agent 说「帮我装 dsh-picture-fit」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。
该插件是 GitHub 源码(未发 npm)——直接从仓库装:
Web profile:
dsh plugin --profile web add github:cyanfish-x/dsh-picture-fit Headless(CLI)profile:
dsh plugin --profile headless add github:cyanfish-x/dsh-picture-fit 实测报告
验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。