diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php index 7e8b6eefe7..b78bac2a56 100644 --- a/src/wp-admin/includes/image.php +++ b/src/wp-admin/includes/image.php @@ -273,6 +273,7 @@ function wp_read_image_metadata( $file ) { 'iso' => 0, 'shutter_speed' => 0, 'title' => '', + 'orientation' => 0, ); /* @@ -389,6 +390,9 @@ function wp_read_image_metadata( $file ) { if ( ! empty( $exif['ExposureTime'] ) ) { $meta['shutter_speed'] = (string) wp_exif_frac2dec( $exif['ExposureTime'] ); } + if ( ! empty( $exif['Orientation'] ) ) { + $meta['orientation'] = $exif['Orientation']; + } } foreach ( array( 'title', 'caption', 'credit', 'copyright', 'camera', 'iso' ) as $key ) {