home / skills / masayan1126 / masayan-uni-code-plugins / image-converter

This skill converts PNG/JPG/JPEG images to WebP, ICO, or SVG formats, streamlining asset delivery for web and apps.

npx playbooks add skill masayan1126/masayan-uni-code-plugins --skill image-converter

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
769 B
---
name: convert-image
description: PNG/JPG/JPEG画像をWebP、ICO、SVG形式に変換。「画像を変換して」「webpに変換」などで使用。
---

# Image Converter

PNG/JPG/JPEG画像をWebP、ICO、SVG形式に変換する。

## 使用方法

詳細は `scripts/convert_image.py --help` を参照。

```bash
# WebPに変換
python3 scripts/convert_image.py input.png --format webp

# ICOに変換(複数サイズ対応)
python3 scripts/convert_image.py input.png --format ico --sizes 16,32,48,256

# SVGに変換(画像埋め込み形式)
python3 scripts/convert_image.py input.png --format svg

# 出力先を指定
python3 scripts/convert_image.py input.jpg --format webp -o output.webp
```

## 依存関係

```bash
pip install Pillow
```

Overview

This skill converts PNG, JPG and JPEG images into WebP, ICO, or SVG formats. It provides straightforward command-style options to select output format, sizes for multi-resolution ICO files, and custom output paths. The tool is lightweight and intended for quick format conversions in development and content workflows.

How this skill works

The converter reads common raster image formats and re-encodes them into the chosen target format. For ICO output it can generate multiple embedded sizes in a single file. For SVG output it embeds the raster image data inside an SVG wrapper. Options allow choosing format, specifying sizes, and selecting an output filename.

When to use it

  • Optimize images for the web by converting PNG/JPEG to WebP for smaller file sizes.
  • Create multi-resolution favicon files by converting a source image to ICO with several sizes.
  • Embed raster images in an SVG wrapper for systems that require SVG assets.
  • Batch or script image format changes as part of a build or deployment pipeline.
  • Quickly convert local images when preparing assets for websites or apps.

Best practices

  • Use WebP for photographs and complex images to reduce bandwidth while preserving quality.
  • Provide multiple icon sizes when creating ICO files (e.g., 16, 32, 48, 256) for broad compatibility.
  • Keep original high-resolution sources; convert from the highest quality master to avoid artifacts.
  • Specify an explicit output filename to avoid accidentally overwriting source files.
  • Test converted assets in target environments (browsers, OS icon pickers) to confirm compatibility.

Example use cases

  • Convert a product photo JPG to WebP to improve page load times on an e-commerce site.
  • Generate a favicon.ico containing 16, 32, 48 and 256 pixel variants from a single PNG.
  • Wrap a raster logo into an SVG container for integration into a vector-focused asset pipeline.
  • Script image conversions as part of CI so all deployed images are served in an optimized format.

FAQ

What input formats are supported?

PNG, JPG and JPEG are supported as source formats.

How do I produce a multi-size ICO file?

Specify the ICO format and list sizes to embed, for example 16,32,48,256.