This is not optimal, you can just compare pointer of object. If i remember correctly images are cached by system, but check it to make sure.