Index: bp-core-avatars.php
===================================================================
--- bp-core-avatars.php	(revision 738370)
+++ bp-core-avatars.php	(working copy)
@@ -486,6 +486,9 @@
  */
 function bp_core_avatar_handle_upload( $file, $upload_dir_filter ) {
 
+	//read raw image data
+	$exif = @exif_read_data( $_FILES['file']['tmp_name'] );
+
 	/***
 	 * You may want to hook into this filter if you want to override this function.
 	 * Make sure you return false.
@@ -545,8 +548,26 @@
 		$editor = wp_get_image_editor( $bp->avatar_admin->original['file'] );
 
 		if ( ! is_wp_error( $editor ) ) {
+
 			$editor->set_quality( 100 );
 
+			if ( wp_is_mobile() ) {
+				//rotate images to display correct orientation from iOS
+				if( !empty( $exif['Orientation'] ) ) {
+				    switch( $exif['Orientation'] ) {
+				    case 8:
+				        $editor->rotate( 90 );
+				    break;
+				    case 3:
+				        $editor->rotate( 180 );
+				    break;
+				    case 6:
+				       $editor->rotate( -90 );
+				    break;
+				    }
+				}
+			}
+
 			$resized = $editor->resize( bp_core_avatar_original_max_width(), bp_core_avatar_original_max_width(), false );
 			if ( ! is_wp_error( $resized ) ) {
 				$thumb = $editor->save( $editor->generate_filename() );
