I'll have to verify this with the community team, but I don´t think it's possible due to the fact that there are no way of getting a user's MyPage via a property on the user object.
I've checked with the community team, as I suspected this is not possible.
The work around would be to either get all the contacts, do the check and sort in memory. Or get the IDs of the contacts and do a MyPage query where the user ID must be in the IDs you got from the contacts.
Is it possible to query the contacts of a user, to only get the contacts where the users have a portrait?