deduplicates image based on hash