When are images actually loaded into memory?

Given code:

src = (ImageList.from_csv(path, 'train_v2.csv', folder='train-jpg', suffix='.jpg')

I noticed this returns an ImageList and if I do src[0].show() it’ll actually show me the image! So, I looked at Image.show() and it seems that it does not actually load the image into memory. It just uses Image.data

    def show(self, ax:plt.Axes=None, figsize:tuple=(3,3), title:Optional[str]=None, hide_axis:bool=True,
              cmap:str=None, y:Any=None, **kwargs):
        "Show image on `ax` with `title`, using `cmap` if single-channel, overlaid with optional `y`"
        cmap = ifnone(cmap, defaults.cmap)
        ax = show_image(self, ax=ax, hide_axis=hide_axis, cmap=cmap, figsize=figsize)
        if y is not None: y.show(ax=ax, **kwargs)
        if title is not None: ax.set_title(title)

Which means it must have been done when I called ImageList.from_csv!

But, I can’t seem to find where the image is loaded even here. So I guess my question is, when is the image actually loaded in from the file system?

It’s done when you index into the ItemList (which ImageList inherits from). The one bit you didn’t consider (the [0] if you like). Indexing into the ItemList calls ItemList.__getitem__ method which then calls ItemList.open which is overridden in ImageList to do the actual opening.
If you’re not familiar with these dunder methods (__ being a dunder), or magic methods as they are also called, then checkout a python guide. This one looks to have decent coverage here.