To batch rename image files by their resolution (e.g., width x height), you can use a script to extract the resolution of each image and rename the files accordingly. Below is a Python script using the Pillow
library:
✅ Python Script: Rename Images by Resolution
🔧 Notes:
-
Replace
path/to/your/images
with your actual directory. -
It renames files to format like
1920x1080_oldfilename.jpg
. -
Avoids overwriting files with same name.
Let me know if you want the new names to be just resolution (e.g., 1920x1080.jpg
), numbered (e.g., image_1920x1080_01.jpg
), or if you’re working in Windows and want a PowerShell or batch script instead.
Leave a Reply