Border-radius doesn't work with images generated by px.imshow

I’m plotting an image using px.imshow:

fig = px.imshow(array_images[index_image], binary_string=True)

I want to apply a border-radius effect to this image to round the corners. Using my browser, I found the proper css selector to be like the following:

#graph > div.js-plotly-plot > div > div > svg:nth-child(1) > g.cartesianlayer > g > g.plot > g > g > image

However, for an unknown reason, applying the property border-radius: 50px; doesn’t change anything to the displayed image. I can’t really wrap my graph in a div and apply the property on the div as the graph bounding box tends to exceed the image one, either in width or height (and the image dimension may change depending on the data inputted).

I’m not a css pro, so maybe that’s a stupid mistake, but I tried to debug this for hours with various selectors, css properties, etc., with no success. Any idea?