title: inserting images tkinter
body: <p>Recently I am working on a project text editor using Tkinter library of Python. I tried to make a function to insert image in text area.</p>
  <pre><code>def insertImage():
      select_image = filedialog.askopenfilename(title=&quot;Select your image&quot;,filetypes=[(&quot;Image Files&quot;, &quot;*.png&quot;), (&quot;Image Files&quot;, &quot;*.jpg&quot;)])
      global img
      img = ImageTk.PhotoImage(file=select_image)
      content_text.image_create(END, image=img)
  </code></pre>
  <p>It works fine when I tried to insert first image but when I insert the second image in Editor, the first image become invisible or white</p>
  <p><a href="https://i.stack.imgur.com/MjfPN.png" rel="nofollow noreferrer">First image</a>
  <a href="https://i.stack.imgur.com/cr0bd.png" rel="nofollow noreferrer">Second image</a></p>
  <p>I have imported all necessary libraries like tkinter, filedialog, PIL,etc.
  Can you please tell what are the problem in my code or could provide the correct solution.
  Thanks in Advance!!</p>