See the --extract-media option in the manual.
Thank you ! 👍
Sébastien Boisgérault <sebastien.boisgerault-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Hello everyone,
>
> When i convert the images.ipynb notebook to markdown, the resuting document
> contains
>
> ::: {.output .execute_result execution_count="4"}
> ![](fcbe61351f965c3664d65d5e93991915402e0483.png)
> :::
>
> but AFAICT, the png file is not generated. Using the standalone option does
> not change anything. And of course, the round-tripping (md -> ipynb) fails
> with:
>
> File fcbe61351f965c3664d65d5e93991915402e0483.png not found in resource path
>
> The original notebook can be visualized here:
> https://github.com/boisgera/python-advanced-eval/blob/master/samples/images.ipynb.
> The (Grace Hopper) image it contains is an image/png cell output
> (Matplotlib is used to display the image) :
>
> {
> "cell_type": "code",
> "execution_count": 4,
> "metadata": {},
> "outputs": [
> {
> "data": {
> "image/png":
> "iVBORw0KGgoAAAANSUhEUgAAAgAAAAJYCAIAAACbx8k3AAEAAElEQVR4nGT92dMsWZIfhrn72SIil2+/S9Xtqq7qbboxPSswwGAAGQwkRYEyQgYZARIvMiNIo0wveseDTGaCXkTqX+CLKJO4CRIIgaSGAIfAAAPMYLqnZ+nprurat7t+Wy4RcTZ3PXhGVPYgH67lzS8z4sRZfPn5z93x6tG/7X3jXUA0tWApAgAGbd/vlst
> ...
>
> I am using pandoc 2.16.2 (Linux). Is it considered a bug or am I missing
> something? Shall I file an issue?
>
> Regards,
>
> Sébastien
>
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6d84aa5d-bdc8-4612-b471-c7b270f3936an%40googlegroups.com.
> ---
> jupyter:
> nbformat: 4
> nbformat_minor: 2
> ---
>
> ::: {.cell .code execution_count="1"}
> ``` python
> import matplotlib.pyplot as plt
> from matplotlib.cbook import get_sample_data
> ```
> :::
>
> ::: {.cell .code execution_count="2"}
> ``` python
> with get_sample_data("grace_hopper.jpg") as file:
> image_array = plt.imread(file)
> ```
> :::
>
> ::: {.cell .code execution_count="3"}
> ``` python
> image_array
> ```
>
> ::: {.output .execute_result execution_count="3"}
> array([[[ 21, 24, 77],
> [ 27, 30, 85],
> [ 33, 35, 92],
> ...,
> [ 76, 114, 189],
> [ 71, 109, 184],
> [ 76, 114, 189]],
>
> [[ 26, 29, 82],
> [ 25, 28, 83],
> [ 27, 29, 86],
> ...,
> [ 60, 98, 173],
> [ 56, 94, 169],
> [ 62, 100, 175]],
>
> [[ 21, 24, 77],
> [ 20, 23, 78],
> [ 20, 22, 79],
> ...,
> [ 79, 117, 190],
> [ 80, 118, 191],
> [ 88, 126, 199]],
>
> ...,
>
> [[153, 13, 24],
> [163, 18, 31],
> [164, 18, 29],
> ...,
> [ 14, 13, 19],
> [ 13, 12, 18],
> [ 11, 10, 16]],
>
> [[149, 12, 22],
> [156, 14, 26],
> [160, 16, 26],
> ...,
> [ 13, 12, 18],
> [ 13, 12, 18],
> [ 12, 11, 17]],
>
> [[150, 12, 25],
> [154, 14, 25],
> [157, 16, 25],
> ...,
> [ 14, 13, 19],
> [ 14, 13, 19],
> [ 14, 13, 19]]], dtype=uint8)
> :::
> :::
>
> ::: {.cell .code execution_count="4"}
> ``` python
> plt.imshow(image_array)
> plt.show()
> ```
>
> ::: {.output .execute_result execution_count="4"}
> ![](fcbe61351f965c3664d65d5e93991915402e0483.png)
> :::
> :::