What does it do?
Pillow is basically a tireless photo-editing assistant: it opens an image file, resizes it, rotates it, crops it, adjusts its colors, stamps text onto it, or converts it between formats, all through a few lines of code. Think of it as a photo-lab technician who processes thousands of prints a minute instead of one. It’s a continuation of the original Python Imaging Library, revived after that project stalled, so it inherited decades of accumulated image-handling knowhow. Every time a website automatically generates a thumbnail from a photo you uploaded, something like Pillow is quietly doing that work behind the curtain.
See it in action
This opens a photo file, shrinks it to a specific size, turns it sideways, and saves the result as a new file.
from PIL import Image
img = Image.open("path/to/photo.jpg")
resized = img.resize((800, 600))
resized = resized.rotate(90)
resized.save("path/to/photo_resized.jpg")
Why would a non-developer care?
Every app that lets you upload a profile picture, generate a thumbnail, or apply a quick filter is relying on something like this to do the pixel-level work. Without a library like Pillow, every website would need to reinvent basic image handling from scratch, which is exactly the unglamorous, error-prone work nobody wants to redo.
Real-world examples
Instagram, in its earliest years, used PIL-family tools to generate the thumbnails and filtered previews that filled your feed. Any time a website resizes your uploaded avatar into a tiny circle, or a document tool converts a scanned page into a PNG, there’s a good chance Pillow or its ancestor is involved. It remains one of the most downloaded packages in the Python ecosystem.
Who uses it
Web developers building photo upload and thumbnail features, plus data scientists prepping image datasets for machine learning.
How it compares to alternatives
Pillow is lighter and easier to learn than OpenCV, which is built for computer vision rather than basic editing, and it’s friendlier than wrestling with ImageMagick’s command-line syntax, though Wand exists specifically to bring ImageMagick’s power into Python with less friction.
Fun fact
Pillow exists because the original PIL project went quiet for years without updates, so a group of developers forked it in 2010, named it Pillow as a pun, and kept it thriving ever since.