def METHOD_NAME(image_file: Path, dest: Path | None = None, quality: int = 100) -> Path:
    """
    Converts an image to the webp format in-place. The original image is not
    removed By default, the quality is set to 100.
    """
    img = Image.open(image_file)
    dest = dest or image_file.with_suffix(WEBP)
    img.save(dest, FORMAT, quality=quality)
    return dest