I want python to iterate images in a directory and pack that to the GUI
from tkinter import *
from pathlib import Path
from PIL import ImageTk, Image
root = Tk()
images = []
paths = Path("images").glob('**/*.png')
for path in paths:
photo = Image.open(path)
photo.thumbnail((100, 100))
img = ImageTk.PhotoImage(photo)
label = Label(image=img)
images.append(label)
for image in images:
image.pack()
root.mainloop()
But the output is just the last picture on the directory: