Cloudinary provides you with two powerful criteria for determining duplications - one for identity comparison and the other for similarity:
- MD5 signature: The
"etag"attribute included in the upload response can be used for recognizing completely identical images.
pHash: If requested (
"phash" => true) this will be included in the upload response, allowing to commit a similarity check and distinguish how close the images are.
More information on pHash: http://www.phash.org/demo/
ETag as public_id: An account-level flag can be enabled to tell Cloudinary to use the ETag of the resource as its public_id. Please raise a ticket through support in order to have this flag enabled.
Checking image dimensions is always a good idea too. Using different hashes instead of just one reduces the chance of hash collisions.