Ask Steves · Daily notes · VPS, 20% off · AI Profit Lab · SEO · Money Hub

22 November 2026 · Practical AI builds

How do I get AI to tag and name a folder of photos?

By the end of this you will have a folder of photos where each file has a short, readable name and a few useful tags, plus a spreadsheet that lists what is in every picture. It suits anyone with hundreds of images called IMG_4821.jpg, such as product shots, event photos or a shared drive nobody has sorted in years.

I learn my automation tips in the AI Profit Boardroom. Have a look here. Affiliate link.

What you need

Step by step

  1. Make a working copy of the folder and pick 20 varied photos as a test batch. Small tests are cheap and show problems early.
  2. Shrink the test images to around 1,000 pixels on the long side. The model does not need full resolution to describe a photo, and smaller files are quicker and cost less on a hosted API.
  3. Decide on your tag list before you start. A fixed list (for example: product, team, event, office, outdoor, document) gives you sorting you can rely on, while free tags drift into twenty words for the same thing.
  4. Write a prompt that asks for a short description, tags from your list only, and a suggested file name, all returned as JSON so your script can read it.
  5. Run the script on the test batch and save the answers to a CSV file with one row per photo: original name, suggested name, description and tags.
  6. Open the CSV in your spreadsheet and check every row of the test batch. Adjust the prompt if names are too long, too vague or use tags outside your list, then test again.
  7. Once the test batch looks right, run the whole folder. Keep the CSV, because it is your record of which new name came from which original file.
  8. Skim the full CSV, fix anything odd by hand, and only then run a second small script that renames the files from the spreadsheet. If two photos get the same suggested name, add a number to the end rather than overwriting.
  9. If you want the tags to travel with the files, write them into the image metadata with ExifTool, so photo apps and file search can find them.

A prompt along these lines works well as a starting point:

Look at this photo and reply with JSON only, no other text.
{
  "description": "one plain sentence, under 20 words",
  "tags": ["up to 3 tags, chosen only from: product, team, event, office, outdoor, document, other"],
  "filename": "3 to 6 lowercase words joined by hyphens, no extension"
}
If you cannot tell what something is, say so. Do not guess names of people or places.

And this is how adding a keyword with ExifTool looks for one file:

exiftool -overwrite_original -Keywords+="outdoor" blue-mugs-on-shop-shelf.jpg

Before you trust a prompt across hundreds of files, it is worth reading how to test an AI prompt properly before relying on it.

What good looks like

You can scan the folder and know what each picture shows without opening it. The names are short and consistent, the tags only come from your list, and when you sort the spreadsheet by tag the groups make sense. A quick spot check of 20 random photos turns up few or no wrong descriptions, and every renamed file can be traced back to its original name in the CSV.

Watch out for

Accuracy. Vision models are good at general scenes but can misread small text, mix up similar products, and confidently invent details. Keep the human review step, especially for anything customers will see or anything you file for legal or financial reasons.

Privacy. Photos often contain faces, addresses on letters and location data in the file itself. If you use a hosted API, check its terms on how uploaded data is stored and used, and consider stripping location data first or using a local model for anything sensitive. There is more on this in how to keep private data out of AI tools.

Questions people ask

Can I do this without sending my photos to a company?

Yes. A vision model running on your own computer or server keeps every image local. It will usually be slower and a little less accurate than the larger hosted models, so test it on your own photos first.

Will the AI recognise who is in my photos?

You should not rely on it for that, and many hosted models will refuse to identify people. Describe people in general terms, such as "two people at a desk", and add names by hand if you need them.

In short, you send each photo to a vision model with a clear prompt, collect its descriptions, tags and suggested names in a spreadsheet, check them yourself, and only then rename and tag the files.

Want more automation tips? The AI Profit Boardroom on Skool is where I get mine. Have a look here. Affiliate link.

Related AI builds: How do I sort incoming emails into categories with AI? · How do I connect a website form to an AI that drafts the first reply? · How do I keep AI replies from inventing facts? · All daily notes