While copying the images with same name in attachment first file is getting replaced with Second and duplicate images are getting uploaded.