from ete3 import Tree, faces, TreeStyle
nw = """((human,chimp),(mouse));"""
Faces = {'human':faces.ImgFace('./human.jpeg'),
'mouse':faces.ImgFace('./mouse.png'),
'chimp':faces.ImgFace('./chimpanzee.jpg')}
def mylayout(node):
if node.is_leaf():
faces.add_face_to_node(Faces[node.name], node, column=1)
t = Tree(nw)
ts = TreeStyle()
ts.layout_fn = mylayout
t.render(file_name='%%inline', w=300, tree_style=ts)