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

Local images cannot be inserted in jupyter notebook. #2988

Closed
ghost opened this issue Oct 1, 2019 · 26 comments
Closed

Local images cannot be inserted in jupyter notebook. #2988

ghost opened this issue Oct 1, 2019 · 26 comments
Assignees

Comments

@ghost
Copy link

ghost commented Oct 1, 2019

In the markdown part, online images can be inserted well, but the local images cannot be recognized.

@rchiodo
Copy link
Contributor

rchiodo commented Oct 1, 2019

Here's an example of it not working, but working in a notebook:

 # Image
 ![image info](./1.png)

@oceanlvr
Copy link

it's doesn't work in jupyter interactive. but working in a markdown file.
image
image

@aszx826477
Copy link

I also have this problem. Local picture cannot be inserted into the VS jupyter markdown cell but web jupyter works well. Is it a bug or something else?

@rchiodo
Copy link
Contributor

rchiodo commented Nov 4, 2019

Yes it is a bug. Has to do with webviews and how VS code renders them. We need to parse the markdown before we send it to be rendered and prefix all relative URLs with vscode-resource:

@wulei-student
Copy link

I have same problem.what should I do?

@huiling-y
Copy link

Have the same problem. Images work fine in web jupyter notebook.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 5, 2019

Yes there is no workaround for this other than hosting the file on a website instead.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 5, 2019

Note to whomever fixes this. Even a fully qualified path doesn't work. We'll have to special case this I believe.

Example that still doesn't work:
![image info](vscode-resource://file//D/Training/SnakePython/1.png)

@aszx826477
Copy link

Hi, Rchiodo. Yes I also try to add prefix vscode-resource: but it still doesn't work. How to report this bug and it could be fixed in the next VS version?

@rchiodo
Copy link
Contributor

rchiodo commented Nov 6, 2019

The bug is already reported. It's this issue here. The number of up votes generally determines how fast we get to things.

@IvanKaloyanov
Copy link
Member

Hi, community. Specifying the prefix does not solve it as it is noted above. May we be more concrete about what's the priority on this item.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 13, 2019

@IvanKaloyanov are you asking:

  • Us (Microsoft) what our priority for fixing this is?
    or
  • Other users to up vote this item?

@IvanKaloyanov
Copy link
Member

@rchiodo More like Microsoft. Did this recived enough attention to be escalated and may we expect a fix soon.

@rchiodo
Copy link
Contributor

rchiodo commented Nov 13, 2019

It's currently in our backlog of items (meaning we plan to fix it), but hard to say when it will be fixed. There's currently 20 items in front of it in the backlog, but that doesn't really mean much. We change priority on stuff all the time.

The only thing I can say is to up vote it. That's usually what gets priority changed.

@IvanKaloyanov
Copy link
Member

@rchiodo Silly question but is the agile board available to the public so I can peek over it in the next weeks?

@rchiodo
Copy link
Contributor

rchiodo commented Nov 13, 2019

@IvanKaloyanov
Copy link
Member

Seems like the board is not available for the public. Thanks anyway, keep up the good work.

@rchiodo rchiodo self-assigned this Nov 27, 2019
@greazer
Copy link
Contributor

greazer commented Dec 5, 2019

For December release we will turn on the new behavior in the insiders build only.

@IanMatthewHuff IanMatthewHuff self-assigned this Dec 13, 2019
@IanMatthewHuff
Copy link
Member

Validated with local image in markdown. Local image from saved file was displayed and (just for kicks) also worked with adding a new image and with running the notebook in our editor. Need to have insiders or setting turned on.

@ashtonx
Copy link

ashtonx commented Dec 13, 2019

Regarding current issue, current insiders weekly works for me, however it doesn't work on svg. Ain't sure if it's a bug though, afair Arch had some imagemagick safety settings.

I don't know if it's used by vscode or not, not sure if it even is supposed to be displayed.
Still I figured I'd mention it just in case, can be easily verified by third party.

If not an issue ignore this reply ;)

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Dec 14, 2019

Reopening as a solution hasnt been documented (current solution is experimental), nor shipped and still insure whether we'll proceed with this approach.

@DonJayamanne DonJayamanne reopened this Dec 14, 2019
@IanMatthewHuff
Copy link
Member

Validated with optional python.dataScience.useWebViewServer on in insiders. Looks good for png and svg.

@DonJayamanne
Copy link
Contributor

python.dataScience.useWebViewServer

@IanMatthewHuff Please could you try this without the useWebViewServer as well. It should work even without that setting.

@IanMatthewHuff
Copy link
Member

@DonJayamanne yup. Looks good with that setting off as well.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
@microsoft microsoft unlocked this conversation Nov 14, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@AndrewLaganaro
Copy link

Hi, I'm using VS Code Insiders and the Python "dev" extension for insiders, and I'm having this same problem. Local images (on the same folder and folders above etc) doesn't render on python notebooks at all.
I tried to copy the suggested solution into settings.json "python.dataScience.useWebViewServer: true" or :false, but my vscode says this command isn't associated with anything.

So, what do I do? Thanks!

@IanMatthewHuff
Copy link
Member

@AndrewLaganaro On insiders we've moving over to a new UI provided by the VSCode notebook interface. Could you please open up a new issue for this? This old issue was just for our old webview UI and we won't reactivate it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests