File size: 4,219 Bytes
45721da
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Incorrect rendering of URL logos supplied to _brand.yml when rendering to HTML
### Bug description

When brand logos are supplied via a URL, quarto renders the URL in the HTML using `\` instead of `/`. This will appropriately show the logo when previewing the render locally, but when pushed to a GitHub Pages site the URL gets converted to a relative path based on the current website. For example, if I have a logo hosted at `https://mysite.github.io/branding/logos/example.png`, and I try to link to it in the `_brand.yml` at `https://mysite.github.io/mypage`, the URL embedded in the html will convert the logo URL to `https:\mysite.github.io\branding\logos\example.png`, which will try to redirect to `https://mysite.github.io/mysite.github.io/branding/logos/example.png` (real example shown in the screenshot)

![Image](assets/quarto-dev__quarto-cli-13215/001.png)

### Steps to reproduce

````qmd
---
title: "Reproducible Quarto Document"
format: html
brand:
  logo: 
    images:
      quarto-logo: 
        path: ![Image](assets/quarto-dev__quarto-cli-13215/002.png)
        alt: "Quarto icon"
    small: quarto-logo
---

This is a reproducible Quarto document using `format: html`. It is written in Markdown and contains embedded Python code. When you run the code, it will produce a message.

{{< lipsum 1 >}}

{{< brand logo small>}}

The end.
````

### Actual behavior

HTML renders the image as follows: `<img src="https:\quarto.org\quarto.png" class="img-fluid">`
When shown in a local preview, this renders the image correctly. When hosted on an external website using GitHub Pages, this appends the image URL to the website URL

### Expected behavior

HTML renders the image with the full URL: `![Image](assets/quarto-dev__quarto-cli-13215/002.png)`
When shown on an external website in a browser, this should correctly render the image.

### Your environment

- IDE: Positron 2025.05.0 build 58
- OS: Windows 11

### Quarto check output

```
Quarto 1.7.29
[>] Checking environment information...
      Quarto cache location: C:\Users\Jonathan.Peake\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.85.1: OK
      Deno version 1.46.3: OK
      Typst version 0.13.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.7.29
      Path: C:\Users\Jonathan.Peake\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\Jonathan.Peake\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2025

[>] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: C:\Program Files\Google\Chrome\Application\chrome.exe
      Source: Windows Registry

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.12.9 (Conda)
      Path: C:/Users/Jonathan.Peake/AppData/Local/miniforge3/python.EXE
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with conda install jupyter

[>] Checking R installation...........OK
      Version: 4.4.2
      Path: C:/Users/Jonathan.Peake/AppData/Local/Programs/R/R-4.4.2
      LibPaths:
        - C:/Users/Jonathan.Peake/AppData/Local/Programs/R/R-4.4.2/library
      knitr: 1.50
      rmarkdown: 2.29

[>] Checking Knitr engine render......OK
```

## Relevant pre-fix discussion

### Issue #12643

#### Comment at 2025-04-29T18:50:18Z

I also created a live GitHub Pages site from the reprex quarto file: https://jonpeake.github.io/quarto-reprex/reprex.html

When accessed from site url:

![Image](assets/quarto-dev__quarto-cli-13215/003.png)

When previewing locally:

![Image](assets/quarto-dev__quarto-cli-13215/004.png)

#### Comment at 2025-04-29T22:43:45Z

I followed the formatting used in this doc, which suggests that a URL is not only allowed but supported:
https://quarto.org/docs/authoring/brand.html

![Image](assets/quarto-dev__quarto-cli-13215/005.png)

![Image](assets/quarto-dev__quarto-cli-13215/006.png)