When images are appearing upside down or rotated, that usually means you took pictures with an iPhone or iPad that was not held correctly with volume buttons pointing down. Apple has built in software to compensate for this rotation, but other machines, email and the web do not. The best solution is to hold your device correctly. Or rotate images afterwards to correct the orientation and save with Metadata set to NONE.