Assign images to nodes