quarto-dev / quarto-dev/quarto-cli
In graphviz, including images via node attributes or html labels does not work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Graphviz supports using an image (for instance a .png image file) as a node background ( image attribute) or in HTML labels. In both cases, the SVG rendered by the dot engine in Quarto removes the image.
Steps to reproduce
Please see https://github.com/tverbeiren/quarto-graphviz/tree/quarto-issue for an example Quarto document. The comp.png file is added both as a node attribute and inside the HTML IMG. Both the quarto versions and the dot CLI versions are available in the graphviz.qmd and resulting graphviz.html files.
Expected behavior
The expected behavior is the one generated by the dot CLI tool. Please see repo branch for more information.
Actual behavior
The images are stripped from the generated SVGs by Quarto. Please refer to the repository for more information.
Your environment
MacOS Ventura 13.4
Quarto check output
Quarto 1.4.449
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.8: OK
Dart Sass version 1.55.0: OK
Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.449
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2023.03.21
Chromium: 869685
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/toni/Library/TinyTeX/bin/universal-darwin
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.5
Path: /opt/homebrew/opt/python@3.11/bin/python3.11
Jupyter: 5.2.0
Kernels: python3
(|) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
(-) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.1
Path: /opt/homebrew/Cellar/r/4.3.1/lib/R
LibPaths:
- /Users/toni/Library/R/arm64/4.3/library
- /opt/homebrew/lib/R/4.3/site-library
- /opt/homebrew/Cellar/r/4.3.1/lib/R/library
knitr: 1.43
rmarkdown: 2.23
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked quarto-graphviz example, especially graphviz.qmd, comp.png, and the resulting graphviz.html. Compare the SVG produced by Quarto with the dot CLI output and trace where the image content is removed during rendering. Done means images supplied through node attributes and HTML IMG labels remain in the generated SVG, matching the dot CLI behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100