I have renewed my passport online and the photo was a bit tricky to be accepted.
The aspect ratio was one and it looks for shadow and brightness of the photo being upload.

At the end after a couple of tries, i was successful in uploading and renewing it.