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

html image tag relative path level up not importing in markdown cell #230

Closed
kehey opened this issue Jul 24, 2015 · 2 comments
Closed

html image tag relative path level up not importing in markdown cell #230

kehey opened this issue Jul 24, 2015 · 2 comments

Comments

@kehey
Copy link

kehey commented Jul 24, 2015

Hi,

I found that using the following tag in a markdown cell failed:

<img src="../img/test.png" width=400px>

while using the same tag (changing the path then of course) when the image is either in the same folder as the notebook or a subfolder, succeeds. So apparently, this import can not deal with going a level up.

Interestingly, if you convert the notebook to an HTLM page using nbconvert, the HTML page shows the image perfectly, since the browser has no problem using a relative path that first goes up (and the html code is this correct). So this seems to be a notebook problem.

I agree this is not a deal-breaker, but it might be something easy to change, and I use this folder structure to keep notebooks and results separated.

Any thoughts on whether this could be looked into?

@minrk
Copy link
Member

minrk commented Jul 25, 2015

what's the URL for the notebook? Is it at the top-level of the notebook directory? If so, the notebook server will not serve any files outside that directory.

@kehey
Copy link
Author

kehey commented Jul 27, 2015

Okay, got it. Just need to launch my notebook in the level above the notebook and images folder. it works now. Thanks!

@kehey kehey closed this as completed Jul 27, 2015
@minrk minrk added this to the no action milestone Jul 27, 2015
zivy added a commit to zivy/ISBI2018_TUTORIAL that referenced this issue Mar 19, 2018
Images were not displayed if the jupyter notebook server is started in
the python or r directories, with the images one directory above. This
is a feature and not a bug in the jupyter notebook app
(jupyter/notebook#230).
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants