quarto-dev / quarto-dev/quarto

Absolute system paths to images are broken. ' [WARNING] Could not fetch resource' error.

Open
#587 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

quarto::quarto_version()
1.5.57

Hello!

I have multiple one-type projects and I use a single qmd file to generate DOCX reports for them.
And I use auto generated paths to insert pictures from my projects into qmd in the form like this:

:::{custom-style="Рис"}
![](/run/media/stanislav/RS_Drive/AGROProject/RESULTS/38. ОООАгрофирмаИгенче/Рисунки/Почвенная_карта_А1_1.jpg){width=16.5cm}
:::

Until some updates everything worked as expected and I could successfully generate my reports.
Now, my old code does not work and I get errors [WARNING] Could not fetch resource ./run/media/stanislav/RS_Drive/AGROProject/RESULTS/38.%20ОООАгрофирмаИгенче/Рисунки/Почвенная_карта_А1_1.jpg: replacing image with description.

As I found out in some googled messages, since quatro 1.5 the absolute system paths are not accepted, and all paths are considered relative to the location of the qmd file. But that is not true in the case of pregenerated tables - I can still add flextables, saved as rds files using absolute paths.

And that new behavior is described neither in the official documentation nor update notes (Julia stuff has only mentioned).

Did I understand correctly, that absolute paths to pictures and other resources (as well as the backward compatibility) were broken broken on purpose under the pretext of mythical repeatability? Or is this really a BUG?

Is there any way to return the ability to use absolute paths to pictures? Yes, paths to pictures transforms to 'images/pic.jpg' if I use visual editor, but not in the markdown mode, and not in the case of dynamic paths generation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with Quarto 1.5.57, a qmd file targeting DOCX, and an absolute image path, then compare it with the working absolute-path flextable case. Check whether the path-resolution behavior is intentional; done means either restoring supported absolute image paths or documenting the confirmed behavior and migration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.