What is the best way to check if an image is unique using PHP? Say I have a directory of about 30 images (about 500*500 pixels), and someone uploads another picture, what is
The system should just be able to filter out images that are excactly the same.
In that case you could simply forget that you're talking about images and just treat them as binary files, using hash_file() to create a hash.
Of course, this would also result in different hashes for images that differ only in metadata such as EXIF comments in JPEG images. You'll have to decide whether that's a problem for you.