Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Panda CompressionNew to Visual Studio Code? Get it now.
Panda Compression

Panda Compression

dongdongli

|
348 installs
| (0) | Free
适用于 VS Code 的图像和代码压缩以及格式转换插件
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Panda Compression — VS Code Extension

图片/代码压缩与格式转换插件
Image & code compression and format conversion for VS Code

概述 Overview

  • 图片压缩:Tinify 在线压缩(需 Key)与接口压缩(无 Key)
    Image compression: Tinify online (API Key) and interface mode (no Key)
  • 本地转换(Jimp):PNG/JPG 互转、ICO 多尺寸生成(合并或分别输出)
    Local convert (Jimp): PNG↔JPG and multi‑size ICO (merged or per‑size files)
  • JS/CSS 压缩:Terser/Clean‑CSS,注释保留可配置
    JS/CSS minification: Terser/Clean‑CSS with configurable comment retention
  • 二级菜单聚合:Explorer 右键“Panda‑格式转换”
    Submenu in Explorer: “Panda‑Format Conversion”
  • 输出通道与状态栏:全流程可视化与日志
    Output channel + status bar: visible progress and logs

使用 Usage

  • 右键文件/文件夹 → Panda‑格式转换 或压缩命令
    Right‑click files/folders → Panda‑Format Conversion or compression commands
  • 观察状态栏与“Panda Compression”输出日志
    Observe the status bar and “Panda Compression” output logs
  • 启用目标体积:在设置中填写 panda.targetSizeKB
    For target size: set panda.targetSizeKB in settings
  • 多尺寸 ICO:设置 panda.icoSizes;单尺寸多文件:启用 panda.icoSeparate
    Multi‑size ICO: set icoSizes; per‑size files: enable icoSeparate

命令与菜单 Commands & Menus

  • Explorer 右键二级菜单 Submenu: Panda‑格式转换
    Explorer context submenu: Panda‑Format Conversion
    • PNG → JPG: panda.pngToJpg
    • JPG/JPEG → PNG: panda.jpgToPng
    • 转换为 ICO: panda.toIcon
    • 压缩到目标体积: panda.compressToTarget(暂时禁用 / temporarily disabled)
  • 菜单顺序 Menu order
    • 转换项位于“压缩”项之后显示(Explorer 右键)
    • 同时提供二级子菜单与直接命令入口
  • 压缩 Compression
    • 目录图片压缩(本地 Key): panda.fileImageKeyCompression
    • 目录图片压缩(无 Key): panda.fileImageCompression
    • 单图压缩(无 Key): panda.imageCompression
    • 单图压缩(本地 Key): panda.keyImageCompression
    • 压缩 JS/CSS: panda.otherFileComporess

配置 Configuration

Key Type Default Description
panda.showTip boolean true 激活提示 / Activation tip
panda.concurrentLimit number 4 并发上限 / Concurrency limit
panda.retryTimes number 2 重试次数 / Retry times
panda.backoffMs number 500 退避毫秒 / Backoff ms
panda.deepCompress boolean false 目录递归压缩 / Recursive compression
panda.tinifyKey string "" Tinify API Key
panda.replaceCurrentFile boolean true 覆盖或新文件 / Overwrite or new file
panda.resizeWidth number 100 裁剪宽 / Resize width
panda.resizeHeight number 100 裁剪高 / Resize height
panda.icoSize object {width:128,height:128} 单尺寸 ICO 尺寸 / Single‑size ICO
panda.icoSizes number[] [16,32,48,128,256] ICO 尺寸 / ICO sizes
panda.icoSeparate boolean false 单尺寸多文件 / Per‑size .ico files
panda.comments boolean false 保留注释(JS/CSS)/ Retain comments

常见问题 FAQ

  • PNG 体积变大:JPG → PNG 为无损转换,可换回 JPG 或使用在线压缩
    PNG larger than JPG: lossless; prefer JPG or online compression
  • WebP/AVIF/目标体积不可用:当前版本为提升稳定性已禁用,后续可选恢复
    WebP/AVIF/Target size disabled: temporarily off to improve stability; may return
  • 无 Key 模式限流:建议使用 panda.tinifyKey
    No Key mode rate‑limit: prefer panda.tinifyKey

支持 Support

若本扩展提升了你的工作效率,欢迎支持作者
If this extension improves your workflow, consider supporting the author
support

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft