Pre-loading images in psychopy builder and reading it via condition file

I want to display images one after another. For the moment, condition file reads the images from the folder ‘images’ for every trial from the folder directly.
conditions.xlsx (9.6 KB)
This could be problematic, as this causes delay. I am aware of loading it during ISI or pre-loading for precise timing . I have added this in ‘Begin experiment’ for pre-loading

##########################

from PIL import Image
import glob
image_list =
for filename in glob.glob(‘images/*.png’): #assuming gif
im=Image.open(filename)
image_list.append(im)

This is not working.

Can you help ?
Thanks in advance