mcpField
I
image-convert

image-convert

github.com/agntswrmCreative & media667 installsUpdated 34w ago
Repository

About image-convert

image-convert is a skill for converting image files or URLs to PNG, JPG, or WebP, with optional lossy-quality and output-path settings.

Key features

  1. 01Convert images to PNG, JPG, or WebP
  2. 02Accept a file path or URL as input
  3. 03Set lossy output quality
  4. 04Choose an output path or directory

Use cases

  1. 01Convert a PNG image to WebP
  2. 02Create a high-quality JPEG
  3. 03Save converted images to a chosen directory

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/agntswrm/agent-media --skill image-convert

After installing, type/image-convertin Claude Code to confirm it loaded.

Details

From the project README

Image Convert

Converts an image to a different format (PNG, JPG, or WebP).

Command

npx agent-media@latest image convert --in <path> --format <format> [options]

Inputs

OptionRequiredDescription
--inYesInput file path or URL
--formatYesOutput format: png, jpg, webp
--qualityNoQuality for lossy formats (1-100, default: 80)
--outNoOutput path, filename or directory (default: ./)
--providerNoProvider to use (default: auto-detect)

Output

Returns a JSON object with the converted image path:

{
  "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:

npx agent-media@latest image convert --in photo.png --format webp

Convert to high-quality JPEG:

npx agent-media@latest image convert --in photo.png --format jpg --quality 95

Convert with custom output directory:

npx agent-media@latest image convert --in image.png --format webp --out ./converted

Providers

  • local (default) - Uses sharp library, no API key required

Comments

Markdown supported