Pillow: optimize images with Python

Optimizing images is key to making websites faster and improving SEO. With the advent of WebP format, it is possible to provide quality images but much “lighter”. In this article we discover how to transform jpg and/or png images into the webp format using a few lines of code written in Python and the Pillow library.