DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-attachment-downscale

z

dsh-attachment-downscale

Manifest valid

DSH Plugin: Automatic Downgrade of Image Attachments Exceeding Limits (2000px / 3.5MB / 40 Megapixels)

hasBundlePatch

dsh-attachment-downscale

DSH 图片附件准入对超限图片(单边 >2000px / 单图 >3.5MB / 像素超 4000 万)直接拒绝, 上传手机原图时体验很差。本插件在 attachments 服务入口(saveImages)把超限图片 用 sharp 自动降级后再入库:

  • 超尺寸 → 等比缩放到限制内(长边 ≤2000px)
  • 缩放后仍超字节数 → 同格式降质(jpeg/webp 质量阶梯),仍不行转 webp
  • 多帧动图(GIF/WebP)跳过不处理,避免破坏动画
  • 处理失败 → 直通原准入逻辑(维持原拒绝行为),绝不吞错误

入库后图片恒满足准入限制,模型请求 / vision-bridge / 历史导出拿到的都是合规文件。

安装

# 本地开发
npm run build        # 或 dev_build_plugin
# 装入 web profile(热生效,免重启):
# dev_install_package /Users/zoumutou/coded/dsh-attachment-downscale web

# 生产(npm 发布后)
dsh plugin --profile web add dsh-attachment-downscale
# 或 GitHub 装配
dsh plugin --profile web add github:zoumutou/dsh-attachment-downscale

市场上架

  • npm 包带 dsh-plugin 关键词,GitHub 仓库打 dsh-plugin 话题后,社区市场 (dsh-suite 每小时刷新 / chnjames dsh-plugin-market 实时查询)自动收录,无需 PR。
  • Release 附件:npm pack 产出 dsh-attachment-downscale-<version>.tgz。

配置

插件行支持 config:

- insert:
    - name: dsh-attachment-downscale
      config:
        enabled: true      # 关闭后恢复原拒绝行为
        quality: 82        # 重编码质量(jpeg/webp)
        # 以下缺省跟随 attachments 服务自身的准入限制:
        # maxImageDimension: 2000
        # maxImageBytes: 3670016
        # maxImagePixels: 40000000

测试

node test/normalize.test.mjs

Versions

Latest versionPublishedSize
0.1.0——

Comments

Loading…

Similar plugins

dsh-image

by uckkk

图片处理:读取尺寸/格式、缩放与格式转换(内置 ffmpeg)

Manifest valid

★ 0

MIT

JavaScript

Aug 19, 2026

dsh plugin --profile web add dsh-image

by dsh-plugins

DeepSeek Harness Web plugin: native image previews plus persistent non-image file-drop attachment cards

Terminal & ClientsManifest valid

★ 0

GPL-3.0

JavaScript

Sep 11, 2026

dsh plugin --profile web add dsh-file-drop-attachments-persisted

by Tiko9527

DSH high-resolution image tiler: slices large images into <=800x800 tiles before sending to DeepSeek. Highly AI-native, only DeepSeek participation.

Manifest valid

★ 0

BSD-3-Clause

TypeScript

Aug 23, 2026

dsh plugin --profile web add @dsh-external/dsh-image-tiler

by azwosile

专供 deepseek-v4-flash-vision-exp 的高清识图增强插件:放宽 DSH 图片限制 + highres_read 分块识图工具。

Vision & MultimodalManifest valid

★ 8

MIT

JavaScript

Sep 11, 2026

dsh plugin --profile web add dsh-highres-vision

by dami9527

DeepSeek Harness 插件:让 deepseek-v4-flash 等不能看图的模型也能处理聊天图片,内置识图工具。安装:dsh plugin --profile web add dsh-image-pathify

Tools & CapabilitiesVision & MultimodalManifest valid

★ 4

↓ 768/wk

MIT

TypeScript

Oct 2, 2026

dsh plugin --profile web add dsh-image-pathify

by meyaomiao

DSH 插件:接近原生质感的附件上传(拖入/粘贴/回形针,图片与文件混排)

UI & ExperienceDevelopment & InfrastructureManifest valid

★ 3

↓ 128/wk

MIT

TypeScript

Sep 14, 2026

dsh plugin --profile web add dsh-files-native