Loading...
Loading...
Image resizing and compression tool skill. Used to adjust image size according to specified pixel width and height, ratio, or maximum size limit, and supports intelligent compression to a specified file size. Suitable for scenarios such as batch processing images, generating thumbnails of specific sizes, compressing images to meet file size limits, etc.
npx skill4agent add wuchubuzai2018/expert-skills-hub image-resizercd scripts
npm installnode resize_image.js <input image> [options]| Parameter | Shortcut | Description | Example |
|---|---|---|---|
| | Target width (pixels) | |
| | Target height (pixels) | |
| | Scaling ratio | |
| - | Maximum width (maintain aspect ratio) | |
| - | Maximum height (maintain aspect ratio) | |
| | Output quality 1-100 | |
| | Target file size (KB), automatic compression | |
| | Output format: png|jpg|webp|original | |
| | Output path | |
| | Target aspect ratio | |
| - | Fit mode | |
| Mode | Description |
|---|---|
| Fill the entire area (may crop, default) |
| Fit entirely within the area (may leave blank space) |
| Stretch to fill |
| Fit entirely (shrink only) |
| Cover completely (enlarge only) |
node resize_image.js input.png -w 800 -h 600 -o output.pngnode resize_image.js input.png -s 0.5 -o output.pngnode resize_image.js input.png -S 500 -o output.jpgnode resize_image.js input.png -a 16:9 -o output.pngnode resize_image.png input.png --max-width 1920 --max-height 1080 -o output.pngnode resize_image.js input.png -f webp -q 80 -o output.webpnode resize_image.js photo.jpg --max-width 1200 -S 300 -f jpg -o thumbnail.jpgnode resize_image.js input.png -w 1080 -h 1080 -S 500 -o instagram.pngnode resize_image.js input.png -a 16:9 -S 200 -o 16_9.jpgimage-resizer/
├── SKILL.md # Skill main file
└── scripts/
├── resize_image.js # Image processing script
└── package.json # Dependency configuration