Why forms set KB limits
Government, exam and job portals often cap uploads at 20, 50 or 100 KB to keep storage and page loads small. The photo only needs to be clear at the size the form shows it, which is often under 400 pixels wide.
To hit a limit, quality is lowered step by step until the file fits. If the lowest sensible quality is still too large, the image is scaled down too. Each result shows its final size and dimensions so you can check it against the form.