image-convert
Original:🇺🇸 English
Translated
Converts an image to a different format (PNG, JPG, WebP). Use when you need to change image formats, optimize for web, or prepare images for specific applications.
8installs
Sourceagntswrm/agent-media
Added on
NPX Install
npx skill4agent add agntswrm/agent-media image-convertTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Image Convert
Converts an image to a different format (PNG, JPG, or WebP).
Command
bash
agent-media image convert --in <path> --format <format> [options]Inputs
| Option | Required | Description |
|---|---|---|
| Yes | Input file path or URL |
| Yes | Output format: |
| No | Quality for lossy formats (1-100, default: 80) |
| No | Output path, filename or directory (default: ./) |
| No | Provider to use (default: auto-detect) |
Output
Returns a JSON object with the converted image path:
json
{
"ok": true,
"media_type": "image",
"action": "convert",
"provider": "local",
"output_path": "converted_123_abc.webp",
"mime": "image/webp",
"bytes": 23456
}Examples
Convert PNG to WebP:
bash
agent-media image convert --in photo.png --format webpConvert to high-quality JPEG:
bash
agent-media image convert --in photo.png --format jpg --quality 95Convert with custom output directory:
bash
agent-media image convert --in image.png --format webp --out ./convertedProviders
- local (default) - Uses sharp library, no API key required