Adjust legend marker size for bar plots

I need to create a high-resolution static bar plot for publication, for which I use write_image.
As a result of the high width and height, the corresponding markers in the legend become too small.

Unfortunately, I cannot find a way to adjust these markers. I would have expected to use a ‘size’ property of the ‘marker’ dictionary in the corresponding trace. I can use this ‘marker’ dictionary to adjust the color:

trace2 = plotly.graph_objs.Bar(....,
    marker=dict(color='rgb(0,0,128)'))

However, if I try to add a ‘size’ property, I get the error:

ValueError: Invalid property specified for object of type plotly.graph_objs.bar.Marker: 'size'

Thus, at the moment I don’t have a way to adjust the marker size in the legend of a barplot. Any hints would be much appreciated.