only creates the object to display. Objects are displayed by one of two actions:

a direct call to IPython.display.display(obj), e.g.

from IPython.display import display
display(i)

the displayhook, which automatically displays the result of the cell, which is to say putting i on the last line of the cell. The lone i in your example doesn't display because it is not the last thing in the cell. So while this doesn't display the image: