return base64-encoded image data from repr methods
return base64-encoded image data from repr methods

avoids any need for ipykernel to deal with ambiguous str/bytes type

ipython/ipython,ipython/ipython