Skip to content

In graphviz, including images via node attributes or html labels does not work #7368

@tverbeiren

Description

@tverbeiren

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/[email protected]/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingthird-partyIssues involving interaction with a third-party librarywontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions