>>/17/
Yeah this will require checking the file properties before renaming for each file. This can be done, say we will use exifftool.
# su
$ torsocks pacman -S perl-image-exifftool
$ exifftool file.png | grep "File Type"
I can incorporate this into the script. Thanks for the suggestion. I'll do this next week or something.