Shard Tools

How to compress an image to an upload limit

Image upload limits usually care about bytes, but users still care about how the image looks. A good compressor has to balance both.

Resolve conflicting image requirements

A form may require JPEG, at least 600 pixels wide and below 200,000 bytes. Those are three independent conditions. If compression returns a clear 500-pixel image, it still fails the width rule. If it returns PNG below the cap, it still fails the format rule. Make a small checklist from the receiving form and compare each output property with its own condition.

Use a permitted crop when irrelevant margins consume pixels, but keep required information such as the full document boundary or product label. Try every new setting from the original rather than repeatedly re-encoding an earlier download. Inspect fine text, hair, fabric and thin lines where artefacts are easiest to miss. When no acceptable attempt satisfies all the rules, use a better source or contact the recipient about an alternative; a green size result does not certify the other requirements.

Pick the right format first

JPG is usually the right choice for photographs because it can reduce file size aggressively with little visible change. PNG is better for screenshots, sharp graphics, and transparency, but it may resist tiny KB limits.

WebP can be efficient for many web images, but the receiving form has to accept it. When a portal asks specifically for JPG or PNG, format compatibility matters more than theoretical compression.

Understand what changes

Lossy compression changes image data to save bytes. If quality alone is not enough, the browser may also reduce dimensions. That can be acceptable for thumbnails and profile photos, but not for documents where small text must remain readable.

A compressor should show the measured output size and dimensions so the result can be checked before download.

Avoid unnecessary uploads

For profile photos, forms, application images, and private screenshots, local browser compression avoids sending the original file to a third-party upload server.

The trade-off is device work: larger images may take longer on older phones, because the compression happens on the device instead of a remote machine.