---
name: image-compress-skill
description: "Shrink images to 25% of their size so AI engines (Claude, GPT, Gemini) read them faster and cheaper. Batch-compresses PNG, JPG, WEBP, BMP, TIFF, HEIC down to 25% of original dimensions. Output is small enough that AI vision models burn 80% fewer tokens — same content, faster reads, lower bill."
license: MIT
---

# Image Compress

Batch-shrink images to roughly a quarter of their original dimensions before you hand them to a vision model. Smaller images mean fewer image tokens, faster reads, and a lower bill — without losing the content the model actually needs to "see." Built for developers and analysts who routinely feed screenshots, scans, or design exports into Claude, GPT, or Gemini.

## When to use it

- You're about to ask an AI to read a 4000x3000 screenshot or a folder of UI captures.
- A request fails or stalls because an image is too large for the upload limit.
- You're running a pipeline that sends hundreds of images to a vision API and the token cost is adding up.
- You have HEIC photos straight off an iPhone that you want analyzed.

## What it does

The skill resizes each image to 25% of its original width and height (a 1/16 reduction in pixel area), then re-encodes it. Because vision models tile images into fixed-size patches to count tokens, cutting the dimensions is what actually lowers the token count — far more than re-compressing at the same resolution would.

Supported inputs: PNG, JPG/JPEG, WEBP, BMP, TIFF, and HEIC. You can pass a single file or point it at a whole folder for batch processing. Aspect ratio is preserved, and outputs are written alongside the originals so nothing is destroyed in place.

## Usage

```
curl -fsSL --create-dirs -o ~/.claude/skills/image-compress-skill/SKILL.md https://claudeskil.com/skills/image-compress-skill/SKILL.md

# then, in a Claude session:
"Compress every image in ./screenshots before analyzing them"
"Shrink invoice-scan.heic so it's cheaper to read"
"This PNG is too big — make it smaller and tell me what it says"
```

The skill triggers automatically when you upload large images and ask for analysis — it will offer to compress first.

## Tips & gotchas

- A flat 25% scale is the right call for documents, UI, and diagrams. For images where fine detail matters — dense tables, tiny serial numbers, fine print — sanity-check that text is still legible after compression, or skip it for that file.
- Token savings come from dimensions, not file format. A re-saved JPEG at full resolution costs nearly the same as the original; the resize is what buys you the ~80% reduction.
- HEIC support depends on the host environment having the right decoder available; if a HEIC file is skipped, convert it to PNG/JPG first and re-run.
- Outputs land next to the source files. Run on a copy if you want the originals untouched in a clean directory.

## FAQ

**Does this reduce quality?** Resolution drops to 25% per side, so it's lossy by design. For most AI-reading tasks the model still parses the content fine; for archival or print use, keep your originals.

**Can it handle a mixed folder of formats?** Yes — point it at the directory and it processes every supported type in one pass.

**Will it really cut my token bill?** For oversized images, yes — vision models bill by image area, so a 1/16-area image uses dramatically fewer tokens.
