by sbierwagen · 9y ago · 0 comments
Note that perceptual hashes should not obey the avalanche effect, so a minor difference in the two images should yield a small change in the hashes (desirable in this case). Then accept results that are within some small % error margin.
An example of a library that does this is jimp [1].
[0] https://en.wikipedia.org/wiki/Perceptual_hashing [1] https://github.com/oliver-moran/jimp#comparing-images
Especially if media queries come into play and we'd have to try different resolutions and ensure they're all the same.
Or even more simply: if your CSS is supposed to work on all pages of a website.