I saved this code a time ago from a comment left here on forum https://community.plotly.com/t/using-local-image-as-background-image/4381/8
import base64
#set a local image as a background
image_filename = 'plotly-logo1.png'
plotly_logo = base64.b64encode(open(image_filename, 'rb').read())
layout = go.Layout(
height=600, width=600,
hovermode="closest",
title='EXTC',
images= [dict(
source='data:image/png;base64,{}'.format(plotly_logo.decode()),
xref="paper", yref="paper",
x=0.5, y=0.90,
sizex=0.95, sizey=0.95,
xanchor="center",
yanchor="middle",
#sizing="stretch",
layer="above")])
fig = go.Figure(layout=layout)
fig.show()