title: How to check similarity of two images that have different pixelization
body: <p>I am running a python code to check similarity of Quora and Twitter users profiles photos, but i am not getting a positive result when images are the same.</p>
  
  <p>This is the code for comparing the two images  :   </p>
  
  <pre><code>path_photo_quora= "/home/yousuf/Desktop/quora_photo.jpg"
  path_photo_twitter="/home/yousuf/Desktop/twitter_photo.jpeg"
  if open(path_photo_quora,"rb").read() == open(path_photo_twitter,"rb").read():
       print('photos profile are identical')
  </code></pre>
  
  <p>despite images are the same, the console is not printing "photos profile are identical", what can i do?</p>