Generate and debug thumbnails and responsive srcset — aspect ratio, sharpness, format, and the picked source
Scanned 9/3/2026
Install to Claude Code
npx -y skills add black141312/ada --skill thumbnail --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Thumbnail?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/black141312-thumbnail)More formats (shields.io, HTML) on the badges page.
---
name: thumbnail
description: Generate and debug thumbnails and responsive srcset — aspect ratio, sharpness, format, and the picked source
category: visual-test
---
# Thumbnail
Reach for this when thumbnails come out stretched, blurry, wrong-format, or the browser picks the wrong `srcset` candidate.
1. Reproduce against the actual source asset: pull the original, note its real dimensions and aspect ratio, and run the resize step in isolation.
2. Diagnose distortion: stretched output means the resize ignored aspect ratio — decide fit (`cover` crop vs `contain` letterbox) explicitly and apply it.
3. Diagnose blur: re-encoding at low quality, upscaling a small source, or a bad downscale filter — downscale with a quality filter (Lanczos/area) and never upscale past the source.
4. Pick the format deliberately: serve AVIF/WebP with a JPEG/PNG fallback; debug `<picture>`/`type` negotiation by checking which candidate the browser actually requested.
5. Build the `srcset` with real intrinsic widths and a correct `sizes` attribute, then verify in devtools (Network → the chosen file, `currentSrc`) that the expected candidate loads at each DPR/viewport.
6. Confirm visually: render each generated size at its display box and diff against the source crop to catch off-by-one cropping or wrong gravity.
## Rules
- Decide and document fit mode (cover vs contain) per use case — silent stretching is the most common thumbnail bug.
- Never upscale beyond the source resolution; generate only sizes ≤ original and let CSS handle the rest.
- `sizes` is required for `srcset` width descriptors to work — a missing/wrong `sizes` makes the browser fetch the largest candidate every time.
- Use a proper downscaling filter and a sane quality setting; default/fast filters produce mushy thumbnails.
- Verify the *picked* source via `img.currentSrc` and the Network tab, not by guessing from the markup.
- Generate at device pixel ratios (1x/2x/3x) and cache by content hash so a re-upload busts stale thumbnails.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!