There's a particular kind of frustration reserved for government and application portals that demand a photo "under 100 KB," or worse, "between 20 KB and 50 KB," with zero explanation of how you're actually supposed to hit that without either terrible quality or an hour of trial and error.
Most of these systems were built years ago on infrastructure that was never designed to handle large uploads at scale. Government portals processing thousands of applications a day, for instance, often cap file sizes just to keep their own servers from getting overwhelmed. The limit usually isn't arbitrary cruelty, it's a legacy constraint that never got updated as camera resolutions grew and grew.
What actually works
Trial and error with a basic image editor's export slider is one of the most tedious ways to solve this, because most editors show you a quality percentage rather than a resulting file size, so you're exporting repeatedly and checking the size manually each time. A tool that searches for the right quality automatically, based on your target KB number, skips that whole loop entirely.
A few things trip people up specifically with ID-style photos. Dimension requirements are often separate from the size requirement — a form might want exactly 600×600px AND under 100 KB, and you need to hit both, not just one or the other. Background matters more than usual too: a plain, evenly lit background compresses more cleanly than a busy one, so you'll often land at a smaller file size with more headroom left for facial detail if the background is simple to start with. And JPEG is almost always required specifically, because these systems are typically built around it, so it's worth checking the form's accepted formats before exporting in anything else.
A typical smartphone portrait for this purpose might come in around 3–4 MB at full resolution. Resized to the form's required dimensions, say 600×600px, and compressed to a moderate JPEG quality, that same photo usually lands comfortably in the 30–80 KB range without looking noticeably different from the full-resolution original at that size. The detail lost is detail nobody was ever going to see at 600px anyway.
If you're stuck on this right now: set your target dimensions first if the form specifies them, then set your target KB size, and let the tool find a quality that satisfies both. ImgReduce supports exact pixel dimensions and exact file-size targets in the same panel, which covers most of these form requirements in a single pass.