The function _array_to_b64str defined in the _imshow.py module (https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/plotly/express/_imshow.py#L27) is quite useful in Dash apps with image processing. We could make it part of the public API (where ? probably in plotly.utils ?). What do you think @nicolaskruchten ? This was brought up recently in Almar's work (plotly/dash-slicer#2).