Calculated which Tags to be added/removed for each image