title: Compress image from Uri
body: <pre><code>@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
          CropImage.ActivityResult result = CropImage.getActivityResult(data);
          if (resultCode == RESULT_OK) {
              imageUri = result.getUri();
              storageReference.putFile(imageUri);
          }
      }
  }
  </code></pre>
  
  <p>How to compress image from <code>Uri</code>? I don't want to compress it to <code>Bitmap</code> or store on device and retrieve from there. Is there any other way?</p>