Browser-only TypeScript library

Normalize images before upload

Detect real MIME types, convert HEIC from iPhones, validate size, and compress — all client-side. One function, zero server round-trips.

Try the playground

Playground

Drop images or pick files. Every option maps directly to NormalizeImageOptions.

Drop images here

or click to browse · multiple files supported

Options
acceptedTypes
Select one or more images to begin.

How it works

The same pipeline runs on every file. Steps light up during processing.

  1. 1 Detect MIME file-type (magic bytes)
  2. 2 Validate type against acceptedTypes
  3. 3 Validate size against maxFileSize
  4. 4 Convert HEIC heic-to (if needed)
  5. 5 Compress browser-image-compression
  6. 6 Build result new File + metadata

Documentation

Full README rendered from the repository.