Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown image for valid image paths does not render #240

Closed
choldgraf opened this issue May 1, 2024 · 4 comments
Closed

Markdown image for valid image paths does not render #240

choldgraf opened this issue May 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@choldgraf
Copy link

choldgraf commented May 1, 2024

I'm not sure what the issue here is, but I've found that paths to valid images do not render properly with Markdown and I'm not sure why.

For example, below I show that an image exists by displaying it with IPython.display.Image, but show that it does not exist if I try to display the same image using markdown with jupyterlab-myst:

image

This also doesn't work for relative paths:

CleanShot 2024-05-02 at 10 06 49@2x

@choldgraf choldgraf added the bug Something isn't working label May 1, 2024
@drewlio
Copy link

drewlio commented May 2, 2024

Possibly related, embeds are not working in the notebook.

Interestingly, the two forms of embeds fail in different ways.

image

image

@scottyhq
Copy link

scottyhq commented Jun 6, 2024

I've just run into this as well (jupyterlab-myst 2.4.2):

Does not render:

![logo](../../scipy2024.png)
<img src="../../scipy2024.png" align="right" width="20%">

Does render (full URL)

<img src="https://github.com/xarray-contrib/xarray-tutorial/blob/main/images/scipy2024.png?raw=true" align="right" width="20%">

Does render if image in same directory as notebook but does not align as expected :(

```{image} ./scipy2024.png
:alt: ScipyLogo
:width: 20%
:align: right
``` 

Does not render if image in a parent directory

```{image} ../../scipy2024.png
:alt: ScipyLogo
:width: 20%
:align: right
``` 

But we have lots of notebooks with local paths in a github repository. It would be nice if this were supported so that the notebook appears in JupyterLab exactly as it does on a website, for example:
https://github.com/xarray-contrib/xarray-tutorial/blob/main/workshops/scipy2024/index.ipynb

@agoose77
Copy link
Collaborator

agoose77 commented Jun 8, 2024

@scottyhq can you confirm where the root directory of the Jupyter server is? I.e the path to the top-level directory in the jupyterlab file browser. The problem described above is a fundamental challenge that follows from Jupyter kernels using a different file system interface (kernel process) to the Jupyter frontend (E.g jupyterlab via Jupyter server).

@agoose77
Copy link
Collaborator

I'm closing this because I'm pretty sure this is due to user expectations rather than a bug in our code. I recognise that this can be confusing, and/or I might be wrong, so please do ping back here if you want to continue the conversation! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants