private PhotoModel tryConvertDriveItemToPhotoModel(
      Optional<String> albumId, MicrosoftDriveItem driveItem, UUID jobId) {

    if (driveItem.file != null
        && driveItem.file.mimeType != null
        && driveItem.file.mimeType.startsWith("image/")) {
      PhotoModel photo =
          new PhotoModel(
              driveItem.name,
              driveItem.downloadUrl,
              driveItem.description,
              driveItem.file.mimeType,
              driveItem.id,
              albumId.orElse(null),
              false);
      monitor.debug(
          () -> String.format("%s: Microsoft OneDrive exporting photo: %s", jobId, photo));
      return photo;
    }

    return null;
  }
Exports Microsoft OneDrive photos using the Graph API.

<p>Converts folders to albums.
extensions/data-transfer/portability-data-transfer-microsoft/src/main/java/org/datatransferproject/transfer/microsoft/photos/MicrosoftPhotosExporter.java