Size is the easy part here
The 350 KB maximum is generous. What gets visa photos rejected is the background, the lighting and the framing.
A 35 × 45 mm photo at print resolution is only a few hundred pixels across, so it fits inside 350 KB with room to spare — you will usually see a result well under a tenth of the limit, and that is correct rather than a mistake. Because size is rarely the problem, this page prints NADRA's full list of photo rules alongside the tool, so you can check the things that actually cause a rejection before you upload.