Adding the tag creating function to the function when a photo is tagged