added code to output tag on image