There is nothing like a good demo to get the grips with an API. Here we show you how to identify the number of unique images on a given page.
On this page we have 3 images:
red.png
green.png
other-green.png
Where green.png and other-green.png are identical except for their filename. Because we are going to use the image's MD5 hash to uniquely identify each image, the fact that the 2 green icons have different filenames does not matter, in fact, nor does the file's domain/location.
Description
This demo takes every image on this page and using this service, obtains each image respective MD5 hash. By counting the number of unique hashes generated, we obtain the total number of unique images on the page. As always, you can have a peek at the Javascript code for this demo.
Finally, if you want to see the demo in action simply click on the button
Total number of images: -
Total number of unique images: -
Total number of errors: -