It says in the comment right above the lines you copied:
// The 5th value is the image index per the list defined in "images" (defaults to 0).
This quite clearly explains that the index refers to the item in the images
array, the one that points to one or more image files.