Specifications differ between boards and notices
RRB and RRC recruitment is run by regional boards, and the photograph and signature requirements are published in each centralised employment notice. They have not always been identical between notices, so the figures to use are the ones in the notice you are applying under.
The upload stage typically validates format, dimensions and file size independently. A JPEG at the right dimensions but slightly over the size limit is rejected, as is a correctly sized PNG where JPEG was required.