The short answer
Use a compressor with a target-size setting: you type the limit in KB and it finds the highest quality that fits under it. Crop the photo first, because every pixel you remove leaves more of the limit for the part that matters.
Do these in order
- Read the form's rules. Note the size limit, the accepted formats, and any required pixel dimensions.
- Crop to the subject. Background is expensive and usually not wanted.
- If the form specifies dimensions, resize to them. A file with fewer pixels compresses to a given size at higher quality.
- Compress with the target set to the limit. Check the result at full size before you upload it.
How target-size compression works
A JPG's size is governed by a quality setting. A target-size tool encodes the photo at several quality levels, measures each result, and keeps the best one that fits. It is the same thing you would do by hand with a quality slider, done in moments.
There is a floor. Below a certain quality a photo turns into visible blocks, and a sensible tool will not go there. If the photo still does not fit, the only honest option left is fewer pixels, so the tool scales the picture down and tries again.
Why very small limits shrink the picture
A limit is a budget shared between all the pixels. A large photo squeezed into a very small limit gives each pixel almost nothing and looks terrible. The same limit spent on a smaller picture looks clean. This is why a tight target comes back smaller in width and height: it is the better of the two outcomes.
If the form rejects the file anyway
- Check the format. Some forms accept only JPG; a PNG or WebP of the right size will still be refused.
- Check whether the limit is in KB or MB, and leave a small margin under it.
- Check for a minimum size or minimum dimensions as well as a maximum.