This Javascript will resize photo in photoshop based on file name.
for this to work you will need to add some info to your file name before the width you will need --w to be directly followed by you size in inches then to be directly followed by _X_h followed by your height in inches then finished by _SSS.
For example
sample 10x10.jpg will look like sample --w10_X_h10_sss.jpg
you will also need to put a save location in for var path
if you need pixels instead of inches change in to px in line 15.