Skip to content

Fix listing feed failing on Windows with a web image URL - #15026

Merged
cderv merged 2 commits into
quarto-dev:mainfrom
Masad791:bugfix/feed-remote-image
Oct 12, 2026
Merged

cderv merged 2 commits into
quarto-dev:mainfrom
Masad791:bugfix/feed-remote-image

Conversation

@Masad791

Copy link
Copy Markdown
Contributor

Description

Fixes #15022.

Listing feeds joined a web image URL onto the project directory, and passed the feed image as is, to imageSize. On Windows the : in https: makes the path invalid, so stat throws os error 123 and the render stops; on macOS/Linux the bad path just doesn't exist, which is why it only showed up on Windows. Web URLs now skip the local size lookup, as website-meta.ts already does. The URL is still emitted as is with its content type, and local images keep their size.

The same block's type check typeof (item[kFieldImage] === "string") was always true; fixed to typeof item[kFieldImage] === "string".

Tested on Windows 11: the new smoke-all test fails without the change (os error 123) and passes with it.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR
AI-assisted PR
  • AI tool used: Claude Code
  • Codebase grounding: local clone
  • Human review: I have reviewed, tested, and verified the AI-generated content before submitting.

When building a listing feed, item images were joined onto the project
directory and the feed image was passed as is to `imageSize`. For a web URL
this makes an invalid Windows path (the `:` in `https:`), so `stat` throws
`os error 123` and the render stops. Skip the local size lookup for web URLs,
as `website-meta.ts` already does.

Also fix the item image type check, which tested `typeof` of a boolean and so
was always true.

Fixes quarto-dev#15022
@posit-snyk-bot

posit-snyk-bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv cderv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

Comment thread news/changelog-1.11.md Outdated
@cderv
cderv merged commit 672a6fb into quarto-dev:main Oct 12, 2026
8 of 10 checks passed
cderv added a commit that referenced this pull request Oct 13, 2026
Listing feed images lost their <height> and <width> when a website was
rendered from outside its directory. createFeed read the size from the
raw image path, which resolved against the process working directory.
The feed <url> already treats the image as project-relative, so the size
is now read from the same project file, join(project.dir, image).
Renders from the project directory produce the same output as before.

- Read the feed image size relative to the project for the listing
  feed.image, document image and site image sources
- Fix leading-slash paths such as /feed.png, which previously read the
  size from the drive root
- Add a smoke test that renders a fixture project from the tests
  directory and checks the size for each source

Related to #15026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RSS Feed conflicts with web-hosted image thumbnails

3 participants