AI

Before/After Photo Composer: 9 Sizes in 3 Seconds

← Back to all posts

Every time a surgeon sends over before/after photos, someone has to size and brand them for every place we post. That someone was me. Here's the list:

Seven sizes. Some need the two photos side by side, some need each photo on its own with a label. So one photo pair really means 9 files.

I was doing it in Canva, one file at a time. Each practice I work with has its own logo and its own surgeons, so every file had a few spots to get wrong. One pair took me 20-30 minutes. With new pairs coming in every week, that's most of an afternoon gone to resizing.

What I Built

Two small Python scripts. I built them with Claude Code over two sessions, about 3 hours total.

The first one handles the wide formats, the side-by-side ones. You give it a before and an after and it makes:

The second one handles the tall formats for Stories and Pinterest. You give it one photo and it:

Both scripts read one config file that lists each brand: its logo, its name, its surgeons. I also bundled the font file (Lato) with the scripts, so the output looks the same no matter which computer runs it.

How I Use It

I drop the photos in a folder and run one command. Batch mode matches each before with its after by filename. If the filename says "tummy tuck," it picks up the procedure too, which matters for the next part.

One command gets me all 9 files plus a spreadsheet of alt text (the description a screen reader reads out loud) for every image. That spreadsheet goes straight into the email builder and the gallery upload.

What Broke

One brand's logo file was more than 15,000 pixels wide. Pillow, the Python library that opens the images, threw a "decompression bomb" warning and wouldn't load it. That's a safety check. A file that huge looks like it could be an attack, so Pillow stops. My first thought was to raise the limit in the code, but that felt wrong. I shrank the logo to 2,400px instead. Problem gone.

The rounded corners also clipped unevenly on some sizes in the first version. The corner size was a fixed number of pixels, so it looked fine on big files and chunky on small ones. Making it scale with the output size fixed it. Took about 3 tries.

Why It Holds Up

Adding a brand is one entry in the config: logo, name, surgeons. A new surgeon is one line. A new size is one line.

When a new surgeon starts, I add the name to the config and that's it. Every photo from that surgeon gets the right credit from then on, and I don't touch anything else.

The alt text means I'm not writing image descriptions by hand anymore. And the output folders match the ones I already use for email campaigns, so nothing gets renamed or moved around.

The Math

Before: 20-30 minutes per pair in Canva, by hand. Easy to miss a size or leave an old surgeon name on.

After: about 3 seconds per pair.

A handful of pairs a week at 20-30 minutes each is a couple of hours back, every week. Same rules every time, so nothing gets missed.

If You Want to Build Something Like This

I'm not a developer. Claude Code wrote the Python, fixed the image errors, and set up the config. My part was knowing what I needed: the sizes, the brand rules, where the files go. If you have a visual task you repeat with the same rules every time (especially across more than one brand), this works.

Most marketers stop at the click. I've worked on the inside.

If you're ready for someone who knows where leads actually turn into patients, let's talk.

I've spent more than a decade in marketing and operations, and the last 7 years in aesthetic marketing for surgeons and med spas. Today I work with eight-figure, multi-surgeon practices. I get into your CRM, your scheduling system and how your coordinators actually work, and I find where leads and numbers slip before I build anything. Every post here is a real example from that work.

Request a session

Tell me where leads are slipping. I'll tell you honestly if I'm the right fit.