Pixels, kilobytes and photo upload limits
By Mihai
Why resizing and compression solve different parts of an upload problem.
Three measurements, three different questions
A photo has pixel dimensions, an encoded byte count and a possible physical print size. Width and height tell you how many pixels exist. File size tells you how much space the encoded image occupies. Print size depends on how densely those pixels are placed on paper. A form can constrain all three. Reading only the KB requirement is a common reason an otherwise small file still gets rejected.
Work from composition to encoding
First identify the exact destination requirements. If it needs a square image, choose whether to crop or pad the source. Resize to the requested pixel dimensions, inspect the result, then compress to the byte ceiling. Doing those steps in the opposite order can waste effort: resizing a compressed JPEG creates another encoding and may push the file over the size limit again.
A practical 600 × 600 example
Suppose a workflow asks for 600 × 600 pixels and at most 100 KB. Use the square resizer, download the JPEG and inspect its framing. Then pass that output to the 100 KB compressor. The second operation can shrink dimensions if low quality alone cannot meet the target, so inspect its result dimensions too. If they changed, reduce visual complexity or use a larger permissible budget. An exact-size requirement and a tiny byte ceiling can conflict.
Two inches is a print instruction
A 2 × 2 inch image at 300 pixels per inch corresponds to 600 × 600 pixels. The pixel calculation does not certify a passport photograph or instruct every printer to use that physical size. Print software can fit to page, add borders or ignore metadata. Set the physical size explicitly and confirm the issuing authority’s current instructions for pose, background, head placement and print quality.
Choose a format based on the content
JPEG is often suitable for photographs, but its lossy encoding can blur text and sharp edges. PNG preserves decoded pixels and transparency, though it may be much larger for a photograph. WebP can be useful for web delivery when supported. Converting a damaged JPEG to PNG does not restore detail; it preserves the already-decoded pixels in a different format. Always keep an original and compare the actual export rather than assuming a format is automatically smaller.