A Hundred Photos, One Sentence
Photo chores are perfect for Claude, because they’re usually the same small change, done many times: resize, convert, compress, rename, repeat.
By hand, that’s an evening. As a request, it’s one sentence:
The library behind almost all of this is Pillow (the classic Python toolkit for opening, changing and saving images).
What Claude Can Do With Images
| Chore | Example request |
|---|---|
| Resize | “Make every photo 1600 pixels wide, keeping the shape.” |
| Compress | “Make these small enough to email, but still sharp.” |
| Convert | “Turn all the PNGs into JPGs.” or “Convert these to WebP for my website.” |
| Rename | “Rename them garden-01, garden-02… in the order they were taken.” |
| Crop | “Crop every photo to a square, centered.” |
| Watermark | “Put my name in small letters in the bottom corner of each one.” |
| Tidy up | “Sort these photos into folders by the month they were taken.” |
That last one works because most photos secretly carry information like the date taken, hidden inside the file. Claude can read it.
Connecting It to Your Website
Remember the Always rule from the responsive design note: keep images small so pages load fast? This is how.
Photos straight from a phone are often several megabytes each. A website needs a fraction of that. So before adding photos to your site:
Take the photos in the "originals" folder, resize them to 1600 pixels wide, convert them to WebP, and save them in "website-photos". Keep the originals exactly as they are. Your site will load much faster, especially on phones.
A Few Things to Know
- iPhone photos are often in a format called HEIC. It needs an extra library, but Claude will find it if you tell it the photos are from an iPhone.
- Compression makes files smaller by throwing away detail you can’t really see. Too much, and photos get blurry. Ask for “small, but still sharp” and check a few.
- Editing the content of a photo (removing a person, changing the sky) is a different kind of job. Python libraries are great for the batch chores above, not for artistic editing.
Same change, many files? That’s exactly what Claude and Pillow are for.
Try it
Copy ten photos from your phone or computer into a new folder. Ask Claude to make website-ready copies: resized, compressed, converted, and neatly renamed. Then compare the total size of the originals and the copies.
See an example prompt
Research the best Python library for batch-editing photos, and recommend one. Then make website-ready copies of every photo in this folder: 1600 pixels wide, converted to WebP, compressed but still sharp, and renamed photo-01, photo-02 and so on. Save them in an "output" folder, leave the originals alone, and tell me the total size before and after.