
pngquant
CLI有损 PNG 压缩命令行工具:把图片转成保留透明通道的 8 位 PNG,体积通常缩小 60%–80%,可整批压缩并设定质量区间,适合给公众号配图、课件插图和网页切图瘦身。macOS 可用 Homebrew 安装,无需账号。
pngquant 3 
pngquant is a PNG compressor that significantly reduces file sizes by converting images to a more efficient 8-bit PNG format with alpha channel (often 60-80% smaller than 24/32-bit PNG files). Compressed images are fully standards-compliant and are supported by all web browsers and operating systems.
This is the official pngquant repository. The compression engine is also available as an embeddable library.
Usage
- batch conversion of multiple files:
pngquant *.png - Unix-style stdin/stdout chaining:
… | pngquant - | …
To further reduce file size, try oxipng, ImageOptim, or zopflipng.
Features
- High-quality palette generation
- advanced quantization algorithm with support for gamma correction and premultiplied alpha
- unique dithering algorithm that does not add unnecessary noise to the image
- Configurable quality level
- automatically finds required number of colors and can skip images which can't be converted with the desired quality
- Fast, modern code
- based on a portable libimagequant library
- C99 with no workarounds for legacy systems or compilers (apart from Visual Studio)
- multicore support (via OpenMP) and Intel SSE optimizations
Options
See pngquant -h for full list.
--quality min-max
min and max are numbers in range 0 (worst) to 100 (perfect), similar to JPEG. pngquant will use the least amount of colors required to meet or exceed the max quality. If conversion results in quality below the min quality the image won't be saved (if outputting to stdin, 24-bit original will be output) and pngquant will exit with status code 99.
pngquant --quality=65-80 image.png
--ext new.png
Set custom extension (suffix) for output filename. By default -or8.png or -fs8.png is used. If you use --ext=.png --force options pngquant will overwrite input files in place (use with caution).
-o out.png or --output out.png
Writes converted file to the given path. When this option is used only single input file is allowed.
--skip-if-larger
Don't write converted files if the conversion isn't worth it.
--speed N
Speed/quality trade-off from 1 (slowest, highest quality, smallest files) to 11 (fastest, less consistent quality, light comperssion). The default is 4. It's recommended to keep the default, unless you need to generate images in real time (e.g. map tiles). Higher speeds are fine with 256 colors, but don't handle lower number of colors well.
--nofs
Disables Floyd-Steinberg dithering.
--floyd=0.5
Controls level of dithering (0 = none, 1 = full). Note that the = character is required.
--posterize bits
Reduce precision of the palette by number of bits. Use when the image will be displayed on low-depth screens (e.g. 16-bit displays or compressed textures in ARGB444 format).
--strip
Don't copy optional PNG chunks. Metadata is always removed on Mac (when using Cocoa reader).
See man page (man pngquant) for the full list of options.
License
pngquant is dual-licensed:
-
Under GPL v3 or later with an additional copyright notice that must be kept for the older parts of the code.
-
Or a commercial license for use in non-GPL software (e.g. closed-source or App Store distribution). You can get the license via Super Source. Email kornel@pngquant.org if you have any questions.
相關資源

SVGO
CLISVG 优化命令行工具与 Node.js 库:删除编辑器元数据、注释、隐藏元素和冗余属性来压缩 SVG,可递归处理整个目录,并通过插件配置精细控制优化规则。
svg/svgo22.7k
fontTools
CLI字体处理工具集:pyftsubset 按实际用到的文字裁剪字体并输出 WOFF2,给中文网页字体瘦身;ttx 把字体转成可读写的 XML,便于查看和修改。适合让 agent 批量处理字体文件。需要 Python 3.11+,安装时带 woff 扩展才能输出 WOFF2;裁剪商用字体前先确认授权允许。
fonttools/fonttools5.3k
Oxipng
CLI多线程的无损 PNG 压缩工具,批量缩小截图、切图和图标的体积而不损画质,还能去掉无用的元数据,适合设计师交付切图或网页上线前压缩图片。macOS 可用 Homebrew 安装。
oxipng/oxipng4.3k
GSAP AI Skills
SkillGSAP 官方动画技能合集:教 agent 正确使用核心 API、时间轴、ScrollTrigger 与各类插件,涵盖 React/Vue/Svelte 集成和动画性能优化。GreenSock 官方维护,所有插件均免费。
greensock/gsap-skills16.5k
Web Asset Generator
Skill从 logo、文字或 emoji 一键生成网站 favicon、PWA 应用图标和各社交平台的分享预览图(Open Graph),自动出齐全部尺寸并检查文字对比度,还能把对应代码加进网页项目。需要本机 Python 与 Pillow。
alonw0/web-asset-generator518
Cloudinary Plugin
PluginCloudinary 官方插件,预置 5 个 MCP 服务和 3 个技能:用自然语言上传、管理、裁剪和压缩图片视频素材,做 AI 图像分析和自动化媒体流程,也能查文档帮开发者接入。需 Cloudinary 账号(有免费档,也可让 agent 先开临时云、24 小时内认领)。
cloudinary-devs/cloudinary-plugin0