Made changes to the ImageUpload function to accomodate extensions for different image types.