MD5 hash
Consider Sha 256 if you want a greater level of collision avoidance or using it for security.
However, also note that the chance of collision with properly implemented MD5 hash is very small:
If you keep all the hashes then the probability [of collision] is a bit higher thanks to birthday paradox. To have a 50% chance of any hash colliding with any other hash you need 2^64 hashes. This means that to get a collision, on average, you'll need to hash 6 billion files per second for 100 years. - ref
When MD5 could make sense instead of Sha256:
- Potential for faster hashing.
- More concise hash (shorter hash.)