Skip to content
yutils
Example

Input

user.jpg (1920×1080, 543 KB)

Output

user_600x400.jpg (600×400, 78 KB)

Note

Source ratio (1.78) ≠ target ratio (1.5) → crop mode center-crops to exactly 600×400.

Usage guide

Use cases

  • Fit profile pictures to a fixed size (e.g., 600×400)
  • Resize and reduce file size for social or blog upload
  • Match width/height requirements on registration or admin forms
  • Generate thumbnails in bulk (aspect ratio preserved)
  • Cut down mobile data — drop JPEG quality to shrink file size

FAQ

Q.Is my file uploaded anywhere?
A.No. All processing happens in your browser via the Canvas API. The file never leaves your device.
Q.Can it handle big files?
A.Up to 20 MB. 4K or large RAW files depend on your browser's memory and may run slowly — not recommended.
Q.Which format should I pick?
A.Photos -> JPEG (best compression). Transparency required -> PNG (lossless). Modern browsers + smaller files -> WebP.
Fun facts
  • Image resizing comes down to pixel-interpolation choice: fast-but-blocky nearest-neighbor → smooth bilinear → sharper bicubic → highest-quality Lanczos. The browser Canvas API's `drawImage` defaults to bilinear or bicubic — a quality/speed compromise.

    Wikipedia — Image scaling
  • JPEG's 'quality' slider actually controls the strength of the DCT-coefficient quantization table. Below ~80% you start seeing block artifacts; 90–95% is the sweet spot where the eye can't tell the difference but the file is smallest.

    Wikipedia — JPEG quality
  • WebP, announced by Google in 2010, is on average 25–35% smaller than JPEG and supports lossless mode like PNG. iOS 14 (2020) was the last major browser to add support — that's when WebP truly hit universal-browser compatibility.

    Google — WebP