IPFS and deduplication

It automatically happen when two blocks have the same hashes. You rarely have to do anything.

So first time it sees the image, it hash the blocks don’t find them in the blockstore and copy them.
Second time it hash the blocks see they are already stored and do nothing.

Note this only work at the block level, files first need to be chunked into blocks and that has different parameters. For example if you add the same image twice but with different block sizes (one 256KiB second 1MiB) they wont be deduped, there is options in the chunking process that also does this.