Image Resizer for Openclaw

A high-performance Python-based tool for individual or batch image resizing with aspect ratio preservation and social media presets.

tobewin
v1.0.0
Mar 30, 2026
1
864
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install image-size-resizer

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install image-size-resizer using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Image Resizer?

Image Resizer is a specialized utility designed for Openclaw Skills that enables AI agents to manipulate image dimensions with professional-grade precision. By leveraging the robust Pillow library and the high-quality LANCZOS scaling algorithm, this skill ensures that every resizing operation maintains visual clarity and eliminates distortion. It is an essential tool for developers and content creators who need to automate the preparation of visual assets for diverse platforms.

Beyond simple scaling, the tool provides a sophisticated interface for handling color mode conversions and batch operations. It empowers users to transition from raw image files to polished, platform-ready assets without manual intervention, making it a cornerstone for automated media workflows within Openclaw Skills.

Image Resizer Use Cases

  • Resizing individual images to specific pixel dimensions for web optimization while preserving the original aspect ratio.
  • Executing batch processing on entire directories of images to ensure consistent sizing for e-commerce or gallery displays.
  • Generating platform-compliant graphics for WeChat, Douyin, Weibo, and Little Red Book using built-in dimension presets.
  • Converting high-resolution document scans to standard A4 300dpi formats for professional printing or digital filing.

How Image Resizer Works

  1. The AI agent receives a request containing target images and desired dimensions or a specific platform preset.
  2. The system initializes the ImageResizer engine and evaluates whether to prioritize width, height, or a fixed aspect ratio.
  3. The tool applies the LANCZOS interpolation algorithm to scale the image data while maintaining maximum detail.
  4. If the output format is JPEG and the source contains transparency, the tool automatically manages the RGBA to RGB conversion to prevent save errors.
  5. Processed files are written to the local file system, and the agent returns the path or a summary of the batch operation results.

Image Resizer Setup

To integrate this functionality into your environment for Openclaw Skills, you must have Python 3 installed. Install the primary dependency using the following command:

pip install pillow

No complex environment variables are required, as the skill operates directly on the local file system through standard Python IO.

Image Resizer Data Schema & Taxonomy

The Image Resizer organizes its operations using a structured metadata system for presets and handles common image formats including PNG, JPG, JPEG, and WebP.

Preset Name Resolution Target Platform
wechat_avatar 640x640 WeChat
douyin_cover 1080x1920 Douyin/TikTok
taobao_main 800x800 Taobao E-commerce
xiaohongshu 1080x1440 Little Red Book
a4_300dpi 2480x3508 Standard A4 Print

Image Resizer Advanced Features

  • High-quality LANCZOS resampling to ensure sharp results even during significant downscaling.
  • Intelligent batch processing that gracefully handles errors for individual files while continuing the overall queue.
  • Automatic color space management that handles RGBA to RGB flattening for JPEG compatibility.
  • Flexible dimension logic allowing for width-only, height-only, or dual-constraint resizing with optional aspect ratio locking.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins python3
Github Stars: 0
forks: 0

Featured*