Attachment Cleaner for Jira will automatically remove duplicate attachments in issues. Note that Attachment Cleaner will currently only look at newly added attachments. An administrator will need to run the project attachment cleaner to remove existing duplicates.
You have an issue with an image attachment with the name yiraphic.png.
You upload two new attachments. The first is an exact copy of the image already attached to the issue. The second is a slightly edited version of the attached image.
Attachment Cleaner keeps track of newly added attachments and once every minute will look at and compare the newly added attachments. After Attachment Cleaner has run you'll notice that the exact duplicate attachment has been removed will the slightly edited version is left on the issue.
Administrators can prevent attachments from having the same name by enabling duplicate attachment renaming.