跳到正文
DEV Community· Bonggi Cho·· 42 分鐘前AI 評分31

照片 100 KB 上限:申請表為何設限,以及如何符合要求

The 100 KB photo limit: why application forms ask for it, and how to hit it

AI 導讀

申請表設定照片大小上限,通常與伺服器頻寬和儲存、列印尺寸、人臉檢查及縮圖顯示需求有關;要符合要求,需同時檢查檔案大小、像素尺寸和格式。Photo Size Reducer 是本週推出的免費 Android 應用程式,可設定目標檔案大小和像素尺寸,並在裝置上處理照片。它不會覆寫原始檔,轉換時會移除 EXIF 位置資料;超過五張照片的批次壓縮需觀看廣告解鎖。

正文

Visa applications. Passport photos. A university portal. A job site. A marketplace listing. A government form that has been online since 2009.

Sooner or later one of them tells you something like this:

Photo must be JPG, under 100 KB, 413 × 531 pixels.

And the photo on your phone is 4 MB and 4032 pixels wide.

I build small Android apps on my own, and this is the exact problem my latest one exists for. Here is what I learned about these limits while building it — useful whether you use my app or not.

Where the limits come from

Nothing about 100 KB is sacred. It is just what the form's back end was built to accept, and the numbers come from somewhere:

  • Bandwidth and storage. Online visa and government portals take millions of uploads a year. A few hundred KB per file is a cost.
  • Print sizes. 413 × 531 px is 35 × 45 mm at 300 DPI — the standard passport photo. A form that prints your photo needs enough pixels to print it, and no more.
  • Face detection. Some portals run a face check before a human sees the file. Too small, and the check fails; too large, and the upload is rejected first.
  • Screens and lists. Marketplaces and classifieds show thumbnails; they do not want your 12-megapixel original.

So the limit is not an accident, and it is not going away. What matters is that you can meet it without guessing.

Why "just compress it" usually fails

Most phone photo editors are built to make a picture look good, not to make it land under a byte count. The usual results:

  1. You resize, but the file is still too big. JPEG size depends on content. A busy photo of a bookshelf can be 3× the size of a portrait at the same dimensions.
  2. You compress, but the dimensions are wrong. The form wants 413 × 531 and you send 1080 × 1390. Some forms resize it for you, some reject it.
  3. You strip metadata by accident — or keep it. Many applications ask you to remove EXIF, and location data in particular. Some editors keep it.
  4. You overwrite the original. This one hurts later: the copy you compressed is now the only one you have.

The reliable approach is to treat size as a target, not a slider: pick the KB number the form asks for, pick the pixel dimensions if it gives them, and let the tool adjust quality and resolution step by step until it meets the target, then save the result as a new file.

A practical checklist

Before you upload anything to a form with a size limit:

  • Read the requirement twice. "Under 100 KB" and "100 KB" are different. So are "100 KB" and "100 KiB" (102400 bytes). Some portals mean the former.
  • Check both limits. KB and pixels. Meeting one and missing the other is the most common rejection.
  • Check the format. JPG is almost always accepted; PNG sometimes; WebP rarely outside Google's own surfaces.
  • Keep the original. Always save the compressed copy under a new name, so you can redo it at another size for another form.
  • Remove location data. A photo for a passport application is not where you want GPS coordinates attached.
  • Zoom in at 100% before submitting. At 100 KB a photo can still look fine at thumbnail size and awful when the person reviewing it opens it. Face, text and edges are what suffer first.

What my app does about it

Photo Size Reducer is a free Android app I published this week. It does the narrow job above and not much else:

  • Presets for 100 KB, 200 KB, 500 KB and 1 MB, or type any target size.
  • Set the exact width and height in pixels when the form specifies them.
  • Batch compression for when a form wants several photos.
  • JPG, PNG or WebP output.
  • Size before and after, with the percentage saved, so you can see what you gave up.
  • On-device only. Photos are processed on the phone, never uploaded to a server. Originals are not overwritten and EXIF location data is removed during conversion. No account, and compression works without an internet connection.

It is free and supported by ads; a batch of more than five photos is unlocked by watching an ad. Depending on the image, it may reduce resolution as well as quality to reach a small target — that is the honest trade, and the app shows you the result before you save it.

Google Play: https://play.google.com/store/apps/details?id=com.cho.uploadready

If you would rather not install anything, the checklist above still applies: work from a copy, check both limits, and look at the file at full size before you send it.


I write about the small Android apps I build and the parts of shipping them that nobody warns you about. If you have a form in your life that only accepts photos under some number of kilobytes, I would like to hear what it asks for — those numbers are how I decide what presets to add next.

來源:DEV Community · dev.to