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.
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:
Do NOT trigger for:
pixmind-image skill)PIXMIND_API_KEY with your keybash
# 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:
PresetQualityFormatUse CaseSavingsweb75WebPWebsite, blog, CMS upload60-70%wechat65JPGWeChat, social media sharing70-80%email55JPGEmail attachments, fast transfer80-90%quality95originalHigh-quality archiving, print30-40%thumbnail60WebPThumbnails, previews, avatars80-90%
Endpoint: POST https://aihub-admin.aimix.pro/api-platform/v1/image/compress Auth: Header Authorization: Bearer {API_KEY}
ParameterRequiredTypeDescriptionimageUrlOne ofstringImage URL (COS or external link)imageBase64One ofstringBase64 image data (supports data:image/xxx;base64, prefix)formatNostringOutput format: webp, jpg, png, avif, heif, tpg``qualityNonumberCompression quality 1-100 (default: 75)widthNonumberTarget width in pixels (maintains aspect ratio)heightNonumberTarget height in pixels (maintains aspect ratio)modeNostringResponse type: url (default) or base64
json
{
"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
OptionShortTypeDefaultDescription--url``-ustring—Image URL to compress--file``-fstring—Local image file path--dir``-dstring—Directory for batch processing--formatstringoriginalOutput: webp, jpg, png, avif, heif, tpg--quality``-qnumber75Quality 1-100--width``-wnumber—Target width (maintain ratio)--heightnumber—Target height (maintain ratio)--preset``-pstring—web, wechat, email, quality, thumbnail--output``-ostringautoOutput directory--recursive``-rbooleanfalseProcess subdirectories--modestringurlResponse: 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