from PIL import Image import pillow_avif image = Image.open("test.jpg") image.save("abc.webp",format="webp")