If you try to upload an image (e.g. via Special:Uploads) which is an duplicate of another, the user becomes an success message and the image is added to Special:Uploads. A click to this only reloads the page and the image isn't uploaded (the same filename as the duplicate was set). I suggest to don't show an success toast and don't add the image to Special:Uploads (without a link to the duplicate one), better is to redirect to the location of the duplicate one. Maybe with an alert before, that the image is an duplicate and the user will be redirected to the duplicate.