'How to check if a Button image is a certain image in tkinter?

I want when I click an image button it runs a function and check if the button image is, let's say, equal to img1:

Button code

b1 = Button(root, image=img1, bd=0, bg='#292424', activebackground='#292424', 
            command=lambda: press(b1))


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source