Skip to content
Back to skills

Image Resize

ASecurity

Batch resize and convert images for the web with format optimization and quality control.

  • 5 stars
  • 0 votes
  • 2 copies
  • 23 views
  • Added October 4, 2026
ai-agentspythonbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add shahshrey/skill-trainer --skill image-resize --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Image Resize?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Image Resize
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shahshrey-image-resize/badge)](https://www.skillsdirectory.com/skills/shahshrey-image-resize)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: image-resize
description: Batch resize and convert images for the web with format optimization and quality control.
---

## Overview

Automatically resize images and convert them to optimized web formats (WebP, JPEG, PNG) in bulk. Perfect for preparing product images, blog assets, or illustration sets for web delivery.

## Features

- Batch processing: resize multiple images at once
- Format conversion: output to WebP (smallest), JPEG (compatibility), or PNG (lossless)
- Quality control: set compression level and quality thresholds
- Aspect ratio preservation: maintain original proportions or crop to target ratio
- Thumbnail generation: automatically create multiple sizes for responsive design

## How to use

Prepare a directory with source images and run the resize command:

```bash
python scripts\resize.py \
  --input /path/to/images \
  --output /path/to/web \
  --sizes 320,640,1280 \
  --format webp \
  --quality 85
```

The script processes all .jpg, .png, and .gif files, creating resized variants for each specified width. Output files use naming convention: `original_name-320w.webp`, `original_name-640w.webp`, etc.

## Configuration

- `--input`: Source directory containing images
- `--output`: Destination directory for resized images (created if missing)
- `--sizes`: Comma-separated list of target widths in pixels (default: 320,640,1280)
- `--format`: Output format; choose webp (default), jpeg, or png
- `--quality`: Compression quality 1-100 (default: 85)
- `--preserve-aspect`: Keep original aspect ratio (default: true)

## Quality presets

- **web**: quality 85, WebP format (recommended for most use cases)
- **high**: quality 90, PNG format (for graphics requiring lossless quality)
- **thumbnail**: quality 75, WebP format (for small preview images)

## Output structure

```
web/
  original_name-320w.webp
  original_name-640w.webp
  original_name-1280w.webp
  another_image-320w.webp
  another_image-640w.webp
  another_image-1280w.webp
```

Files in this skill

  • SKILL.md1.9 KB
  • scripts/resize.py1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.