title: Python tkinter not showing gif image and appears as PhotoImage.1
body: <p>I'm doing a tic tac toe project for my intro to python class and I want to make a grid of 9 buttons so when you click on them an image of an x or a circle appears. My code functions properly without the images but it does't with images.</p>
  
  <p><a href="https://i.stack.imgur.com/UODbJ.png" rel="nofollow noreferrer">Layout for tic tac toe</a></p>
  
  <p><a href="https://i.stack.imgur.com/OpXi9.png" rel="nofollow noreferrer">What happens after I click on one of the buttons</a></p>
  
  <p>this is the code (sorry I never posted on stack so I don't know how to format)
  This is the new one</p>
  
  <pre><code>def sink(self, i):
  
      if self.turn:
          me = PhotoImage(file="x.gif")
          self.turn = False
          self.bState[i] = -1
          self.bList[i].config(relief=SUNKEN, text=me, state='disabled')
      else:
          me = PhotoImage(file="o.gif")
          self.turn = True
          self.bState[i] = 1
          self.bList[i].config(relief=SUNKEN, text=me, state='disabled')
  </code></pre>