image does not display in ipython
Question: The image does not load if it is part of a while loop. For e.g. the following
works as expected:

    
    
    from IPython.display import Image
    Image(filename='someimage.jpg')
    

But this does not work:

    
    
    while True:
        Image(filename='someimage.jpg')
        break
    

update:

How do I display several images from a list?


Answer: This works fine here:

    
    
    from IPython.display import display, Image
    
    path1 = "/some/path/to/image1.png"
    path2 = "/some/path/to/image2.png"
    
    for path in path1, path2:
        img = Image(path)
        display(img)
    

