Hello!
Something happened with your attachment, there's no code attached. Please address that so we know exactly what you are talking about when you reference something.
You did not say how would those output images will be saved as - some columnin the csv or a cumulative of the back and art names maybe? This is important because it will have to take the place of your current image outputting facility so the naming convention should be the same.
Also, you mention teh back sizes only as "small", "large" etc, these categories would have to be strictly defined by image dimensions.
Kind Regards,
Dobri