Function to save attributes with images added.