code: private static Image uploadImage(
        AdWordsServicesInterface services, AdWordsSession session, String url) throws IOException {
      Image image = new Image();
      image.setType(MediaMediaType.IMAGE);
      image.setData(com.google.api.ads.common.lib.utils.Media.getMediaDataFromUrl(url));
      MediaServiceInterface mediaService = services.get(session, MediaServiceInterface.class);
  
      return (Image) mediaService.upload(new Media[] {image})[0];
    }
docs: Uploads the image from the specified {@code url}.
  
  @return the {@code Image} that was uploaded.
  @throws IOException if the image cannot be loaded.