Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PixSqueezeNew to Visual Studio Code? Get it now.
PixSqueeze

PixSqueeze

PixSqueeze

| (0) | Free
Compress PNG/JPEG/WebP images locally from the Explorer context menu. Free, offline, no API key.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PixSqueeze

本地图片压缩 VS Code / Cursor 扩展。在资源管理器中右键压缩 PNG / JPEG / WebP,无需 API Key,无月配额。

压缩基于 sharp(libvips),效果接近 TinyPNG,但完全离线。

功能

  • 右键单个图片 → Compress Image
  • 右键文件夹 → Compress Images in Folder(递归)
  • 支持多选文件
  • 默认覆盖原图;可改为输出 *.min.ext
  • 压缩后更大则自动跳过(可关)

开发调试

cd vscode-image-compress
npm install
npm run compile

在 Cursor / VS Code 中打开本项目,按 F5(Run Extension)启动扩展开发宿主窗口,即可在新窗口里试用。

配置

设置 默认 说明
pixSqueeze.quality 80 JPEG / WebP / PNG 质量
pixSqueeze.pngEffort 10 PNG 压缩力度 1–10
pixSqueeze.pngDither 0 PNG dither(0=自动)
pixSqueeze.overwrite true 是否覆盖原文件
pixSqueeze.skipIfLarger true 压缩后更大则保留原图

打包安装

npm run package

生成 .vsix 后,在 Cursor 中:

Extensions → … → Install from VSIX…

说明

  • 本地处理,图片不会上传
  • 有损压缩,肉眼通常几乎无感
  • 效果与 TinyPNG 不完全相同(算法不同),但体积下降幅度通常接近
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft