Happens to me now and then, too, and not just with portrait images.
When I see it now, I open the image in my phone's editor, rotate it 90° and then 90° back to the way I want it, make some other change (like a tiny crop) to force the editor to save all edits, then replace the misoriented image...