Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>TinyPNG PlusNew to Visual Studio Code? Get it now.
TinyPNG Plus

TinyPNG Plus

无忧

|
47 installs
| (1) | Free
一键压缩目录下所有图片,支持官方API和免费双模式
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TinyPNG Plus - VSCode 扩展

TinyPNG Plus

与众不同的图片压缩扩展

市面上的 TinyPNG 扩展都需要 API Key,且无法递归压缩目录。TinyPNG Plus 带来革命性突破:

两大核心优势

1. 完全免费模式

  • 无需 API Key - 开箱即用,零配置
  • 无限制压缩 - 不受每月 500 张限制
  • 智能切换 - API 配额用完自动切换免费模式

2. 强大递归压缩

  • 深度遍历 - 自动扫描所有子目录
  • 批量处理 - 一键压缩整个项目的图片
  • 保持结构 - 完美保留原有目录层级

功能特性

  • 双模式支持:官方 API(稳定高效)+ 免费模式(无需配置)
  • 递归目录压缩:深度遍历所有子文件夹
  • 单文件压缩:精确压缩指定图片
  • 多 API Key:自动切换,突破单个 Key 限制
  • 并发处理:双模式均支持 2 个并发
  • 智能跳过:压缩后更大则保留原文件
  • 灵活输出:支持原地替换或输出到新目录
  • 格式支持:JPG、JPEG、PNG、WebP

使用方法

1. 安装扩展

在 VSCode 扩展市场搜索 "TinyPNG Plus" 并安装。

2. 直接使用(免费模式)

无需任何配置,安装后即可使用!

3. 配置 API Key(可选)

如需使用官方 API:

  1. 访问 TinyPNG Developers 获取免费 API Key
  2. 打开 VSCode 设置,搜索 "tinypng"
  3. 添加 API Key(支持多个)

4. 压缩图片

批量压缩(递归目录)

  1. 右键点击文件夹
  2. 选择 "TinyPNG 压缩"
  3. 选择模式:
    • 压缩文件夹 (API) - 使用官方 API
    • 压缩文件夹 (免费) - 无需 API Key

单文件压缩

  1. 右键点击图片文件
  2. 选择 "TinyPNG 压缩"
  3. 选择压缩模式

配置选项

配置项 默认值 说明
tinypng.apiKeys [] API Keys 数组(可选)
tinypng.replaceOriginal true 直接替换原文件
tinypng.outputFolder "compressed" 输出文件夹名称
tinypng.fileDelay 200 文件间延迟(毫秒)
tinypng.preserveStructure true 保持目录结构
tinypng.copyUnsupported true 复制非图片文件
tinypng.autoSwitchToCrawler true 自动切换到免费模式
tinypng.outputFormat "original" 输出格式 (original/webp/png/jpeg)

更新日志

v1.4.7

  • 免费模式并发数提升至 2
  • 添加 .vscodeignore 优化包体积

v1.4.6

  • 并发压缩支持
  • 修复进度条显示问题
  • 修复目录结构保持问题

v1.3.1

  • 单文件压缩支持
  • 右键菜单优化

v1.2.0

  • 重命名为 TinyPNG Plus

v1.0.0

  • 首次发布
  • 双模式支持
  • 递归目录压缩

许可证

MIT License

支持

  • 问题反馈
  • 功能请求

TinyPNG Plus - VSCode Extension

TinyPNG Plus

A Different Image Compression Extension

All TinyPNG extensions on the market require API Keys and cannot recursively compress directories. TinyPNG Plus brings revolutionary breakthroughs:

Two Core Advantages

1. Completely Free Mode

  • No API Key Required - Ready to use, zero configuration
  • Unlimited Compression - No 500 images/month limit
  • Smart Switching - Auto-switch to free mode when API quota exhausted

2. Powerful Recursive Compression

  • Deep Traversal - Automatically scans all subdirectories
  • Batch Processing - Compress all project images with one click
  • Preserve Structure - Perfectly maintains directory hierarchy

Features

  • Dual Mode Support: Official API (stable & efficient) + Free Mode (no config needed)
  • Recursive Directory Compression: Deep traversal of all subfolders
  • Single File Compression: Precise compression of specific images
  • Multiple API Keys: Auto-switching, break single key limits
  • Concurrent Processing: Both modes support 2 concurrent tasks
  • Smart Skip: Keep original if compressed file is larger
  • Flexible Output: Replace original or output to new directory
  • Format Support: JPG, JPEG, PNG, WebP

Usage

1. Install Extension

Search "TinyPNG Plus" in VSCode Extension Marketplace and install.

2. Direct Use (Free Mode)

No configuration needed, use immediately after installation!

3. Configure API Key (Optional)

For official API usage:

  1. Visit TinyPNG Developers for free API Key
  2. Open VSCode settings, search "tinypng"
  3. Add API Key(s)

4. Compress Images

Batch Compression (Recursive Directory)

  1. Right-click on folder
  2. Select "TinyPNG Compression"
  3. Choose mode:
    • Compress Folder (API) - Use official API
    • Compress Folder (Free) - No API Key needed

Single File Compression

  1. Right-click on image file
  2. Select "TinyPNG Compression"
  3. Choose compression mode

Configuration

Option Default Description
tinypng.apiKeys [] API Keys array (optional)
tinypng.replaceOriginal true Replace original files
tinypng.outputFolder "compressed" Output folder name
tinypng.fileDelay 200 Delay between files (ms)
tinypng.preserveStructure true Preserve directory structure
tinypng.copyUnsupported true Copy non-image files
tinypng.autoSwitchToCrawler true Auto-switch to free mode
tinypng.outputFormat "original" Output format (original/webp/png/jpeg)

Changelog

v1.4.7

  • Free mode concurrency increased to 2
  • Added .vscodeignore to optimize package size

v1.4.6

  • Concurrent compression support
  • Fixed progress bar display issue
  • Fixed directory structure preservation

v1.3.1

  • Single file compression support
  • Context menu optimization

v1.2.0

  • Renamed to TinyPNG Plus

v1.0.0

  • Initial release
  • Dual mode support
  • Recursive directory compression

License

MIT License

Support

  • Issue Report
  • Feature Request

Enjoy your image compression experience!

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