Install
openclaw skills install pixmind-image-compressCloud-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.
openclaw skills install pixmind-image-compressCloud-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.
Use this skill when the user mentions:
Do NOT trigger for:
pixmind-image skill)PIXMIND_API_KEY with your key# 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
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% |
Endpoint: POST https://aihub-admin.aimix.pro/open/cos/image/compress
Auth: Header X-API-Key: {API_KEY} and X-App-Key: {APP_KEY}
| 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 |
{
"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
}
}
Input: JPG, JPEG, PNG, WebP, GIF, BMP, HEIC, HEIF
Output: webp, jpg, png, avif, heif, tpg
| 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 |
~/Downloads/compressed-images/{date}/ by defaultphoto_001.jpg, photo_002.jpgweb for sites, wechat for sharing, email for attachmentswebp for web — best compression with good qualityjpg or webp; for screenshots/diagrams: png or webp