Brilliant, thank you so much! This is exactly what i was looking for
Is there a way to make it work with image filenames that include spaces? Like: "my cool image.jpg", or can it only handle "my_cool_image.jpg"?
I tried with spaces, resulting in the process reloading the page and (seemingly) repeating the process over and over again (without saving any new images for that matter).