Websites, apps & code / Coding & debugging

Batch-resize photos before uploading

Your shop needs 100 product photos uploaded but each is 6MB and the site chokes.

1Fill in your details

Leave blank to use the example. Names are remembered for other prompts too (stored only on your device).

2Pick a variationYour situation

3Copy the prompt

I have many product photos that are too large and want to batch-resize them with Python and Pillow.

Requirements: Longest side 1200 px, under 300KB each, saved as jpg
Photo location: 100 photos in Desktop\product-photos, named from IMG_0001.jpg
Other needs: Rename as "product-name-001.jpg" while resizing; I will give you the product list.

Please:
1. Write the full script, saving results to a new folder and never modifying or overwriting the originals.
2. Loop through quality settings until each file fits my size limit, and print the filename of any that cannot.
3. At the end print how many were processed and how much space was saved.
4. Walk me through installing Pillow and running it, because I am a beginner.
5. Explain why keeping a backup of the originals matters.
Process only jpg and png files and skip others, telling me which.

[Make it sound human]
- Explain in plain words; no pleasantry openers or empty summaries.
- Only necessary, short, practical code comments; the simplest working approach, no over-engineering.
- Interface text (buttons, hints, error messages) should sound like a person wrote it; no "seamless", "empower", "unlock".
[Quality] Code must run as is and handle common errors; tell me how to test it and confirm it works; ask first if a requirement is unclear; never put passwords or API keys in the code.

Paste it into ChatGPT, Gemini, Claude or Meta AI.

Test result

This one was not tested on its own. Uses in this category share the same structure, and we spot-tested several of them, for example: Explain what code does, Fix an error message

AI tools that suit this

  • Claude Suggested tool Free plan

    Strong at long documents, editing and code

  • ChatGPT Suggested tool Free plan

    The most widely used AI chat, for writing, questions and images

  • Gemini Suggested tool Free plan

    Google's AI; generates and edits images, works with Gmail and Docs

Recommendations only, not sponsored. Check each site for what the free plan includes.

This site is made by FullMark Tech

Want your own website, or your shop spreadsheets automated? FullMark Tech builds business websites and custom Excel tools.

Ask on WhatsApp See FullMark Tech services