image-resize

from agntswrm/agent-media

media cli for agents

1 stars0 forksUpdated Jan 21, 2026
npx skills add https://github.com/agntswrm/agent-media --skill image-resize

SKILL.md

Image Resize

Resizes an image to a target width or height while optionally maintaining aspect ratio.

Command

agent-media image resize --in <path> [options]

Inputs

OptionRequiredDescription
--inYesInput file path or URL
--widthNoTarget width in pixels
--heightNoTarget height in pixels
--outNoOutput path, filename or directory (default: ./)
--providerNoProvider to use (default: auto-detect)

At least one of --width or --height must be specified.

Output

Returns a JSON object with the resized image path:

{
  "ok": true,
  "media_type": "image",
  "action": "resize",
  "provider": "local",
  "output_path": "resized_123_abc.png",
  "mime": "image/png",
  "bytes": 45678
}

Examples

Resize to 800px width:

agent-media image resize --in photo.jpg --width 800

Resize to exact dimensions:

agent-media image resize --in photo.jpg --width 1024 --height 768

Resize with custom output:

agent-media image resize --in image.png --width 500 --out ./resized

Providers

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

Repository Stats

Stars1
Forks0
LicenseApache License 2.0