How to export images in Jupyter notebook attachment:media to disk files?

Viewed 210

I have a Jupyter notebook with some images in the attachment that look like this:

<img src="attachment:media/image20.png" style="width:2.83in;height:2.85in" /> 

I wanted to use this image elsewhere, but I couldn't find the image file image20.png or the media folder anywhere on the hard drive. I guess the image file is somewhere inside the .ipynb itself.

My question is:

How to export the image file referenced by attachment:media/... to an actual .png file on the disk?

Note: I searched around on SO, and only found answers to export the output of a cell. e.g.

Jupyter Notebook: automatically saves all images

(, ... or saving the output of a maplotlib plot function.)

But the images above are not from the output of any code cell or code. I can see the image in the notebook, but not the actual .png file in the file system.

0 Answers
Related