Repository navigation
Fix listing feed failing on Windows with a web image URL - #15026
Merged
Merged
Conversation
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
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
3 of 5 tasks
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #15022.
Listing feeds joined a web
imageURL onto the project directory, and passed the feedimageas is, toimageSize. On Windows the:inhttps:makes the path invalid, sostatthrowsos error 123and 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, aswebsite-meta.tsalready 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 totypeof 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):
AI-assisted PR