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.
This is the c
The two images are NOT the same - only the thing imaged. The images obviously are different size, as you note yourself. Thus a comparison must fail.
You'll need to employ some kind of similarity check. The first step is to scale up the smaller image to the one of the larger one. Then you need to employ some mean of detecting and defining similarity. There are different ways and methods for that, and any combination of them might be valid.
For example see Checking images for similarity with OpenCV