code: public String compress(String imagePath, File destination, boolean deleteSourceImage) {
  
          String compressedImagePath = compressImage(imagePath, destination);
  
          if (deleteSourceImage) {
              boolean isdeleted = deleteImageFile(imagePath);
              Log.d(LOG_TAG, (isdeleted) ? "Source image file deleted" : "Error: Source image file not deleted.");
  
          }
  
          return compressedImagePath;
      }
docs: Compress the image at with the specified path and return the filepath of the compressed image.
  
  @param imagePath         The path of the image you wish to compress.
  @param destination       The destination directory where the compressed image will be stored.
  @param deleteSourceImage if True will delete the original file
  @return filepath  The path of the compressed image file