A cryptographic hash answers one specific question, is this exactly the same sequence of bytes as before. Change a single pixel, resave a JPEG at a slightly different quality, or add one byte of metadata, and MD5 or SHA-256 will come back completely different, with no partial credit and no sense of how close the two files actually are. That is the entire point. A hash that changed gradually as a file changed gradually would be useless for verifying downloads or signing software, since a tiny undetected corruption would slip through unnoticed.
A perceptual hash answers a completely different question, does this look like the same image. It is built by shrinking the photo down to a tiny grid, in some cases as small as 8 by 8 pixels, throwing away the fine detail entirely and keeping only the broad pattern of light and dark. Two photos that started identical and then went through different JPEG compression settings will usually reduce to nearly the same tiny grid, even though every byte of the actual files is now different. That is what makes it useful for catching duplicates that a cryptographic hash would treat as completely unrelated files.
Why MD5 needs its own code while the others do not
Modern browsers include a built-in, hardware-accelerated implementation of SHA-1, SHA-256, SHA-384 and SHA-512 through the Web Crypto API, which is what this tool uses for those four. MD5 is not included. It was formally deprecated from that standard because of well documented collision weaknesses that make it unsuitable for anything security related. Since MD5 checksums are still extremely common in everyday developer workflows, package registries, older systems, quick sanity checks, this tool implements the MD5 algorithm directly rather than leaving it out, while still being upfront that it should never be relied on for anything where security actually matters.
What actually happens when you generate an SRI attribute
Subresource Integrity was designed for the browser to check a fetched file against a hash you provide up front, refusing to use the file at all if it does not match. The format it expects is specific: the algorithm name, a hyphen, then the hash in base64 rather than the hex format most tools default to. That mismatch, hex versus base64, is the most common reason a hand-copied SRI attribute silently fails. The Copy SRI button next to SHA-256, SHA-384 and SHA-512 sidesteps that entirely by producing the exact string the attribute expects, ready to paste. If you are hosting images that other pages fetch and verify, that same hash pairs well with the metadata viewer for confirming exactly what you are shipping.