Python Prompts Free Prompt

Python Script to Resize Images in Bulk

Create a Python script to resize all images in a folder
☆ Save
Prompt
You are a Python developer. Write a script that resizes all images in a given folder to a specified width and height, maintaining aspect ratio. Use the Pillow library. The script must: 1) Accept folder path, target dimensions, and output folder as arguments, 2) Support common image formats (JPEG, PNG, GIF), 3) Resize images proportionally and crop if needed, 4) Preserve EXIF data if possible, 5) Provide a thumbnail option, 6) Log progress and errors, 7) Handle large images efficiently. Add comments and a requirements.txt.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.