All Mini Tutorials

AI Does It For You

Resize Hundreds of Images With AI — Without Touching the Originals

Let an AI coding agent create resized copies of a whole folder of images while keeping every original image untouched.

5 minBeginnerImages, Files, Windows, Mac, Small BusinessCodex / Claude Code

The problem

You may have a folder containing dozens or hundreds of large photos. They may be too large for a website, email, WhatsApp, online forms, product listings or a business website. Resizing them one by one is slow. An AI coding agent can create smaller copies automatically, but it must never overwrite the originals.

What you need

  • Codex or Claude Code
  • A folder containing the images
  • An idea of what the smaller images are for
  • For website use, you might choose a maximum width such as 1600px. Pixels describe image dimensions. A smaller maximum width usually means a smaller file while still looking good on screen.

Safety first

1. NEVER MODIFY ORIGINALS. The source images must remain untouched. 2. USE A NEW OUTPUT FOLDER. Create resized copies in a separate folder called Resized-Images. 3. KEEP THE IMAGE SHAPE. Preserve aspect ratio, so an image does not become stretched or squashed. 4. DO NOT CROP BY DEFAULT. Cropping removes part of the image; do not crop unless you specifically request it. 5. DO NOT OVERWRITE. If an output filename already exists, report the conflict rather than replacing it. 6. TEST 3 IMAGES FIRST. Create only 3 sample resized images before processing the full folder.

Copy-paste prompt

I want resized copies of the images in this folder: [SOURCE FOLDER] The resized images are for: [EXAMPLE: WEBSITE USE] My preferred size is: [EXAMPLE: MAXIMUM WIDTH 1600PX] IMPORTANT SAFETY RULES: - Do not modify any original images. - Do not overwrite any original images. - Do not move or rename the originals. - Create a NEW output folder called: Resized-Images - Preserve each image's aspect ratio. - Do not stretch or squash images. - Do not crop images unless I explicitly approve cropping. - Keep sensible image quality. - Do not overwrite files that already exist in the output folder. FIRST: Inspect the source folder. Tell me: 1. how many supported images you found; 2. the image types present; 3. the approximate current size/dimension range; 4. the exact resizing rule you propose; 5. any files you cannot process confidently. Then create resized copies of ONLY 3 sample images in the new output folder. Report the before and after dimensions for those 3 images. Then STOP. Do not process the rest of the folder until I approve the samples.

When you are ready to approve

Approval prompt

I have checked the 3 sample images and they look correct. Proceed with the remaining supported images using the same resizing rules. Keep these rules: - originals must remain untouched; - create resized copies only; - preserve aspect ratio; - do not crop; - do not overwrite existing output files; - report any unsupported or failed images. After processing, tell me: 1. how many images were resized; 2. how many were skipped; 3. any errors or conflicts; 4. where the resized images were saved.

Steps

  1. Choose the folder containing the images. If the images are important, keep a backup as normal good practice.
  2. Decide what the smaller images are for. For ordinary website images, you might ask for a maximum width such as 1600px. This is not a universal rule: the right size depends on where the images will be used.
  3. Give Codex or Claude Code access to the source folder using the normal workflow for the tool. You do not need to use image-processing software, write a script, or use Terminal or PowerShell yourself.
  4. Paste the first prompt and review the 3 sample images. Check that they are not stretched, nothing important was cropped, quality still looks good, and the originals are still present. Example: product-photo-01.jpg at 6000 × 4000 can become a resized copy named product-photo-01.jpg at 1600 × 1067. The image shape stayed the same: it was made smaller without stretching or cropping.
  5. Only when the samples look right, paste the approval prompt. Then let the agent create the remaining resized copies. Image dimensions and file size are related, but they are not exactly the same thing. A resized image will usually have a smaller file size, but the exact result also depends on image format and quality settings.

What success looks like

Before: the source folder contains product-01.jpg, product-02.jpg and product-03.jpg, and the large original files remain there. After: the source folder is unchanged, and a new folder named Resized-Images contains product-01.jpg, product-02.jpg and product-03.jpg in smaller dimensions. The originals still exist exactly as before. Some folders contain different image formats, so the agent should clearly report what it can process, what it cannot process and anything it skipped. It must not silently ignore failures.

If it goes wrong

Stop processing images. Do not change the originals. The sample resized images are not correct. Show me: 1. the original dimensions; 2. the resized dimensions; 3. the resizing rule you used; 4. whether aspect ratio was preserved; 5. whether any cropping occurred. Do not process more images. Wait for me to choose a new resizing rule. If the wrong output size was used, delete or recreate ONLY the generated output folder after checking it contains no originals. The source folder must remain untouched.

Next useful tutorial

Rename Hundreds of Files With AI — No CodingOrganise Your Downloads Folder With AI
Resize Hundreds of Images With AI — No Coding | NonDevApps