web-files-image-handling

Installation
SKILL.md

Image Handling Patterns

Quick Guide: Two different jobs with two different tools. Displaying an image means URL.createObjectURL() and revoking it afterwards — the browser already applies EXIF rotation, so rotating manually rotates twice. Processing an image means Canvas: clamp to 4096px, scale in multiple passes for reductions past 50%, fill white before writing JPEG, and prefer the async toBlob() over toDataURL().

Detailed Resources:

  • examples/core.md — the shared loadImage helper, preview hook and component, dimension extraction and validation, EXIF parsing, gallery state
  • examples/preview.md — parallel thumbnail sets, gallery grid
  • examples/canvas.md — the resize pipeline, target-size compression, cropping, watermarks, filters
  • reference.md — format and strategy selection, constants, method comparison, EXIF values, browser support

Which path applies

Installs
59
GitHub Stars
24
First Seen
Apr 7, 2026
web-files-image-handling — agents-inc/skills