Hi, I needed the same, so I wrote a simple function to do it and posted in to this gist: Display dynamically custom HTML on hover / click on a data point of Plotly plot. · GitHub
Example usage (assuming your images are stored locally) :
plot = xp.scatter(df, "nb_x", "nb_y")
template="<img src='./img/{id}.png'>"
interactive_plot(df, plot, template)
Output :
