How to correctly import image to interface in tkinter How to correctly import image to interface in tkinter tkinter tkinter

How to correctly import image to interface in tkinter


i ran your script and it works perfectly. I don't know if you have multiple tkinter windows in your project but if this the case, use render= ImageTk.PhotoImage(master=tf,image = load) instead of render = ImageTk.PhotoImage(load). This will solve the issue.If you don't have multiple windows, try to create your render variable before creating your PhotoImage like this

render = 0render = ImageTk.PhotoImage(load)

I don't know why this work but i solved similar issues with this sevral times.I hope one of my solutions will help you.


Well... I forgot to add

tf.mainloop()

At the end of script

Thanks for your help!