f = open('My_Image.png', 'wb')
You can insert the image in your Jupyter notebook using the following code snippet.
from IPython.display import Image
from IPython.core.display import HTML
Image("My_Image.png", width=300, height=500)
Note: The above code snippet is written in Python. This will need to be adjusted for other languages. Also, this stack overflow answer gives more details on the topic: https://stackoverflow.com/questions/57629588/importing-scripts-into-a-notebook-in-ibm-watson-studio