code: static boolean deleteImageFile(String imagePath) {
          // Get the file
          File imageFile = new File(imagePath);
  
          boolean deleted = false;
          // Delete the image
          if (imageFile.exists()) {
              deleted = imageFile.delete();
          }
  
          return deleted;
      }
docs: Deletes image file for a given path.
  
  @param imagePath The path of the photo to be deleted.
  @return True if the file is deleted and False otherwise