If you have noticed that under certain circumstances your pictures with the Nexus 5X are upside down/inverted, don't panic. It turns out it is not something broken, but is simply because the third party camera app you are using does not fully comply with Google's Camera2 API.
Here's the scoop: Don’t panic if Nexus 5X camera apps show inverted images
Here's the scoop: Don’t panic if Nexus 5X camera apps show inverted images