Guide · Pixels

Resize a photo to a pixel size in the browser

A form asked for 1280 px on the long edge, or 600×400. Set those pixels in the tab, read the measured byte size, then download. This is not a kilobyte cap.

Phone photos are often 4032×3024 or similar. A CMS, a team page, or a listing form may name a pixel size instead of a file-size cap. LocalPix Resize resamples in this tab. The photo is not uploaded. The status line prints the output width, height, and the real blob.size after encode.

Related jobs on this site: attachment KB caps if the form named 100, 200, or 500 KB, PNG to JPG if you also need a JPEG, JPG under a form cap if the portal printed its own number, and resume photo if the next step is a small headshot file.

Steps

  1. Open Resize. Resize stays disabled until a file is chosen. Optional proof: Verify local.
  2. Drop a JPEG, PNG, WebP, HEIC, or AVIF from disk. Files above 80 MiB (83,886,080 bytes) are refused. Choosing a file does not start libheif.
  3. Type the width and height the form named, or switch to Long edge and type one number (for example 1280). Keep aspect is on, so 1280 on a 4:3 photo writes 1280×960. Press Resize.
  4. Read the status line for input pixels, output pixels, and the measured kilobytes. Download the -{width}x{height} file from a local blob: URL. If the form also named a KB cap, take that JPEG to Compress to KB next.

How it works

JPEG, PNG, and WebP decode in this browser, then canvas.drawImage writes the new grid. PNG stays PNG. JPEG, WebP, HEIC, and AVIF download as JPEG at quality 0.92. HEIC uses libheif-js 1.23.5 (1,463,506 bytes) from /assets/libheif/ on the Resize press, the same decoder as HEIC to JPG. AVIF uses this browser; there is no extra decoder.

Byte size is not a target on this page. A 1280 px JPEG can be 80 KB or 400 KB depending on the photo. The status prints whatever blob.size was. A named kilobyte cap is Compress to KB, which does not change width or height.

Limits

FAQ

Does the photo leave this device?

No. Processing stays in the tab. Watch Network: you may see libheif under /assets/libheif/ for HEIC. You should not see a POST of the photo. Verify local.

The form said 100 KB, not 1280 px.

That is a file-size job. Open Compress to KB and type 100. Resize will not search JPEG quality toward that number.

Will a 4000 px photo become 100 KB if I type 640?

Not as a guarantee. 640 px often yields a smaller file, and the status prints the measured bytes. If you still need a cap, compress the JPEG next.