ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified media Safety 4/5

Img Optimizer

Compress, resize, and convert images using ImageMagick. Batch process with quality control.

Why use this skill?

Use the OpenClaw Img Optimizer to automate batch image compression, format conversion, and resizing with ImageMagick. Perfect for web performance and media assets.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/sa9saq/img-optimizer
Or

What This Skill Does

The Img Optimizer skill for OpenClaw is a powerful command-line interface wrapper designed to streamline image manipulation tasks. Leveraging the industry-standard ImageMagick library alongside specialized tools like cwebp and optipng, this skill enables users to programmatically compress, resize, format-convert, and batch-process images directly from their workspace. It acts as an automated technician, ensuring that visual assets meet specific technical requirements for web performance, social media standards, or email distribution without manual intervention.

Installation

To integrate this utility into your OpenClaw environment, execute the following command in your terminal: clawhub install openclaw/skills/skills/sa9saq/img-optimizer

Ensure you have ImageMagick 7+ installed on your system. Optional packages such as optipng and cwebp are recommended for enhanced compression efficiency for PNG and WebP formats respectively.

Use Cases

This skill is highly versatile for developers and content creators. Typical use cases include:

  • Optimizing hero images for faster web page loading speeds.
  • Batch-converting entire directories of PNG assets into the modern, performant WebP format.
  • Resizing large raw photos into specific social media dimensions, such as Facebook/Twitter Open Graph tags.
  • Generating standard thumbnails for galleries while maintaining aspect ratio and crop-to-fill integrity.
  • Preparing email-safe assets by restricting image widths.

Example Prompts

  1. "Compress all JPEG files in the current folder to 80% quality and strip their metadata to save space."
  2. "Resize all images in the ./uploads directory to a width of 1200px while maintaining the aspect ratio, and convert them to WebP."
  3. "Create a 300x300 square thumbnail from banner.jpg, cropping the center to fill the frame."

Tips & Limitations

When using the Img Optimizer, keep in mind that batch processes can consume significant system memory if handled improperly, so consider processing files in smaller batches for extremely high-resolution images. Always use the '-strip' flag to remove extraneous EXIF data, which helps reduce file size significantly and protects user privacy. Be aware that converting formats with transparency (like PNG) to JPEG will result in a black or white background; always use '-background white -flatten' to handle alpha channels correctly. Furthermore, ensure you sanitize your filenames to prevent shell injection vulnerabilities. If an image is already highly optimized, the tool may not show significant further reduction, which is expected behavior for lossy formats.

Metadata

Author@sa9saq
Stars1133
Views1
Updated2026-02-18
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-sa9saq-img-optimizer": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#imagemagick#compression#imaging#web-optimization#batch-processing
Safety Score: 4/5

Flags: file-read, file-write, code-execution