Context
From Copilot review on PR #1 (comment on packages/myst-cli/src/build/ipynb/index.ts:48).
Problem
finalizeMdast writes output assets to ${dirname(output)}/files and rewrites image URLs to files/... web paths. However, collectImageData() resolves relative URLs against the source file's directory (article.file).
This means images produced into the files/ folder (e.g. from executed notebook outputs) won't be found by collectImageData() and therefore won't be embedded as cell attachments.
Proposed Fix
Pass the output directory / imageWriteFolder into collectImageData() and resolve files/... URLs against that folder as a fallback when the source-relative path doesn't exist.
Priority
Low — most QuantEcon lectures use static images that resolve correctly from source. This only affects executed output images (e.g. matplotlib plots saved during notebook execution).
Context
From Copilot review on PR #1 (comment on
packages/myst-cli/src/build/ipynb/index.ts:48).Problem
finalizeMdastwrites output assets to${dirname(output)}/filesand rewrites image URLs tofiles/...web paths. However,collectImageData()resolves relative URLs against the source file's directory (article.file).This means images produced into the
files/folder (e.g. from executed notebook outputs) won't be found bycollectImageData()and therefore won't be embedded as cell attachments.Proposed Fix
Pass the output directory /
imageWriteFolderintocollectImageData()and resolvefiles/...URLs against that folder as a fallback when the source-relative path doesn't exist.Priority
Low — most QuantEcon lectures use static images that resolve correctly from source. This only affects executed output images (e.g. matplotlib plots saved during notebook execution).