Same applies for one user uploading an image twice. You will need to prevent regular users from having permission to attach images if this concerns you that much, or just accept that it's possible to upload duplicates which takes up more disk space than necessary.