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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/sa9saq/img-optimizerWhat 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
- "Compress all JPEG files in the current folder to 80% quality and strip their metadata to save space."
- "Resize all images in the ./uploads directory to a width of 1200px while maintaining the aspect ratio, and convert them to WebP."
- "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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-sa9saq-img-optimizer": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, file-write, code-execution
Related Skills
threat-model
Threat modeling and attack scenario design. Identify risks before they become vulnerabilities. STRIDE, attack trees, risk matrix.
Sns Auto Poster
Schedule and automate social media posts to X/Twitter with cron-based queue management.
security-review
Comprehensive security review for code, configs, and operations. OWASP, prompt injection, crypto security. Auto-triggers on security-related changes.
Process Monitor
Monitor system processes, identify top CPU/memory consumers, and alert on resource thresholds.
Readme Generator
Auto-generate comprehensive README.md files by analyzing project structure and configuration.