Batch image processing - compress, resize, format convert, watermark, EXIF clean, and crop. All local, no upload needed.
Design & media
pixmind-image-compress
Try itCloud-powered image compression and resize — compress JPG/PNG/WebP/HEIC to WebP/AVIF, resize images, batch process folders. No local dependencies, uses Tencent Cloud COS imageMogr2 via Pixmind API. Save 60-90% file size with scene presets (web, wechat, email, thumbnail). Supports format conversion, quality control, and dimension adjustment.
What it does
Cloud-powered image compression and resize — compress JPG/PNG/WebP/HEIC to WebP/AVIF, resize images, batch process folders. No local dependencies, uses Tencent Cloud COS imageMogr2 via Pixmind API. Save 60-90% file size with scene presets (web, wechat, email, thumbnail). Supports format conversion, quality control, and dimension adjustment.
The skill document
Pixmind Image Compress
Cloud-powered image compression and resize. Compress JPG, PNG, WebP, HEIC photos to WebP, AVIF or smaller JPG — save 60-90% file size with zero local dependencies.
Powered by Pixmind + Tencent Cloud COS imageMogr2.
Why this skill?
- Zero install — No sharp, ImageMagick, or native modules. Runs on any platform with just an API key.
- Cloud-processed — Handles HEIC, AVIF, TPG formats that local tools struggle with.
- Scene presets — One command for web, WeChat, email, or archival use.
- Batch ready — Compress entire folders recursively.
- Safe by default — Never overwrites originals, auto-numbered output.
When to use
Use this skill when the user mentions:
- Compress — "图片太大"、"压缩一下"、"缩小文件"、"reduce image size"、"compress photo"、"file too large"
- Format conversion — "转成 JPG"、"PNG 转 WebP"、"HEIC 转 JPG"、"convert to webp"、"change format"
- Resize — "缩小到 1920px"、"调整尺寸"、"resize image"、"reduce dimensions"、"scale down"
- Batch — "批量压缩"、"处理这个文件夹"、"compress all images"、"batch resize"
- Scene optimization — "用于邮件附件"、"上传网站"、"微信发送"、"optimize for web"、"shrink for email"
- Typical triggers:
- "帮我压缩这张图片,文件太大了发不了微信"
- "Screenshot.png is 10MB, make it smaller"
- "Convert all PNGs in this folder to WebP"
- "Resize these photos to max 1920px width"
Do NOT trigger for:
- Image generation (use
pixmind-imageskill) - Image editing (crop, rotate, watermark, filters)
- Image analysis (OCR, content recognition, EXIF reading)
Prerequisites
- Register at pixmind.io — 200 bonus points on signup (free trial)
- Create an API key in the API Platform dashboard
- Set env
PIXMIND_API_KEYwith your key
Quick Start
# Compress a single image (local file)
node {baseDir}/compress.js --file ~/Desktop/photo.png --preset web
# Compress from URL
node {baseDir}/compress.js --url https://example.com/image.jpg --quality 80 --format webp
# Resize to max 1920px width
node {baseDir}/compress.js --file photo.jpg --width 1920
# Batch compress a folder
node {baseDir}/compress.js --dir ~/Pictures/ --preset web --recursive
Presets
Quick scene-based compression — no need to remember quality numbers:
| Preset | Quality | Format | Use Case | Savings |
|---|---|---|---|---|
web | 75 | WebP | Website, blog, CMS upload | 60-70% |
wechat | 65 | JPG | WeChat, social media sharing | 70-80% |
email | 55 | JPG | Email attachments, fast transfer | 80-90% |
quality | 95 | original | High-quality archiving, print | 30-40% |
thumbnail | 60 | WebP | Thumbnails, previews, avatars | 80-90% |
API Details
Endpoint: POST https://aihub-admin.aimix.pro/api-platform/v1/image/compress
Auth: Header Authorization: Bearer {API_KEY}
Request Body (JSON)
| Parameter | Required | Type | Description |
|---|---|---|---|
imageUrl | One of | string | Image URL (COS or external link) |
imageBase64 | One of | string | Base64 image data (supports data:image/xxx;base64, prefix) |
format | No | string | Output format: webp, jpg, png, avif, heif, tpg |
quality | No | number | Compression quality 1-100 (default: 75) |
width | No | number | Target width in pixels (maintains aspect ratio) |
height | No | number | Target height in pixels (maintains aspect ratio) |
mode | No | string | Response type: url (default) or base64 |
Response Format
{
"code": 1000,
"message": "success",
"data": {
"originalUrl": "https://bucket.cos.region.myqcloud.com/image.jpg",
"compressedUrl": "https://bucket.cos.region.myqcloud.com/image.jpg?imageMogr2/format/webp/quality/75",
"originalSize": 1024000,
"compressedSize": 256000,
"format": "webp",
"quality": 75,
"width": 800,
"height": 600
}
}
Supported Formats
Input: JPG, JPEG, PNG, WebP, GIF, BMP, HEIC, HEIF
Output: webp, jpg, png, avif, heif, tpg
CLI Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--url | -u | string | — | Image URL to compress |
--file | -f | string | — | Local image file path |
--dir | -d | string | — | Directory for batch processing |
--format | string | original | Output: webp, jpg, png, avif, heif, tpg | |
--quality | -q | number | 75 | Quality 1-100 |
--width | -w | number | — | Target width (maintain ratio) |
--height | number | — | Target height (maintain ratio) | |
--preset | -p | string | — | web, wechat, email, quality, thumbnail |
--output | -o | string | auto | Output directory |
--recursive | -r | boolean | false | Process subdirectories |
--mode | string | url | Response: url or base64 |
Output Rules
- Compressed files saved to
~/Downloads/compressed-images/{date}/by default - Original files are never modified or overwritten
- Duplicate filenames auto-numbered:
photo_001.jpg,photo_002.jpg - Batch mode preserves original directory structure
Guidelines
- For local files, the script auto-reads and converts to Base64 for upload
- Default to quality 75 — good balance of quality and size
- Match presets to use cases:
webfor sites,wechatfor sharing,emailfor attachments - When resizing, specify only one dimension to maintain aspect ratio
- For batch processing, show progress and total savings summary
- After compression, always show before/after size and savings percentage
- Prefer
webpfor web — best compression with good quality - For photos: recommend
jpgorwebp; for screenshots/diagrams:pngorwebp - HEIC (iPhone) photos are natively supported — no extra dependencies needed
Related skills
智能压缩图片体积,在保证画质的同时减少文件大小,支持批量处理与格式转换(JPG/PNG/WebP),提高网页加载及上传效率。当用户要求压缩图片、图片瘦身、减小文件大小、图片超过平台大小限制时必须触发。关键词:LinkPix、图片压缩、压缩图片、图片瘦身、减小体积、批量压缩、WebP转换、上传大小限制、图片优化。
对图片进行智能压缩优化。支持本地路径、文件夹和远程 URL,直传 NX API 压缩后返回 CDN 地址和压缩率。适用于用户提到图片压缩、图片优化、减小图片体积、TinyPNG、JPG/PNG/WebP 压缩的场景。
Generate or edit AI images with Pixmind. Use for 文生图、图生图、图片编辑、产品图、海报、配图、封面、角色一致性, or whenever the user asks to create or modify an image through Pixmind.
Pillow image toolkit for resize, crop, watermark, format conversion, and web optimization.
Rescale an image into social banner versions using ImageMagick. The image is resized to fit and the leftover space is padded black — never cropped. Use when the user wants a banner, cover photo, or resized version for a social profile or article header. Never overwrites the original — creates new files beside it. Defaults to Twitter/X (5:2, 1500x600); other platforms available on request.