            // actually we want to return just the first item, but array.getMap returns ReadableMap
            // which is not compatible with promise.resolve and there is no simple solution to convert
            // ReadableMap to WritableMap so it's easier to return an array and pick the first item on JS side
-@@ -126,7 +131,7 @@ final class MediaLibraryUtils {
+@@ -126,7 +133,7 @@ final class MediaLibraryUtils {
      }
    }
  

   }
 
   static int[] maybeRotateAssetSize(int width, int height, int orientation) {
@@ -265,9 +318,7 @@ final class MediaLibraryUtils {
     return TextUtils.join(",", result);
   }
 

+    int height = cursor.getInt(heightIndex);
+    int orientation = cursor.getInt(orientationIndex);
+
+    // If the image doesn't have the required information, we can get them from Bitmap.Options
+    if (mediaType == Files.FileColumns.MEDIA_TYPE_IMAGE && (width <= 0 || height <= 0)) {
       BitmapFactory.Options options = new BitmapFactory.Options();
       options.inJustDecodeBounds = true;
+      BitmapFactory.decodeFile(uri, options);
