Skip to content

User Guide: Use absolute URLs for notebook images to fix GitHub rendering#164

Open
brycelelbach wants to merge 1 commit intomainfrom
fix/notebook-images-lfs
Open

User Guide: Use absolute URLs for notebook images to fix GitHub rendering#164
brycelelbach wants to merge 1 commit intomainfrom
fix/notebook-images-lfs

Conversation

@brycelelbach
Copy link
Copy Markdown
Collaborator

@brycelelbach brycelelbach commented Mar 27, 2026

Summary

  • GitHub's notebook renderer resolves relative image paths via raw.githubusercontent.com, which serves Git LFS pointer files as text/plain instead of actual image content. This breaks all LFS-tracked images in the Accelerated Python User Guide notebooks when viewed on GitHub.
  • Replaced 42 relative image paths across 14 notebooks with absolute media.githubusercontent.com URLs, which correctly serve LFS content.
  • SVG references (not in LFS) are left as relative paths.
  • Normalized a double-slash in one path (chapter-02//gpu-kernel-exec.png).

See brycelelbach/jupyter-github-relative-image-test for a minimal reproduction of the underlying GitHub bug.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

❌ Link Check Failed

Broken links were detected in this PR.

Please check the workflow run logs for details on which links are broken.

Common fixes:

  1. Typo in URL - Check for spelling mistakes in the link
  2. Outdated link - The page may have moved or been deleted
  3. Relative path issue - Ensure relative links use the correct path
  4. External site down - If the external site is temporarily down, you can add it to brev/.lycheeignore

To test links locally:

./brev/test-links.bash .

📚 Lychee documentation

@nv-kriehl
Copy link
Copy Markdown
Collaborator

@brycelelbach It looks like the Link Check failed here. We should fix that before pushing this change.

@brycelelbach
Copy link
Copy Markdown
Collaborator Author

@brycelelbach It looks like the Link Check failed here. We should fix that before pushing this change.

The link failure is in the GPU deployment guide, caused by the Brev docs changing; there was already a fix in flight, but not in this branch: #165

@brycelelbach brycelelbach force-pushed the fix/notebook-images-lfs branch from 0327a80 to 5e992ba Compare March 30, 2026 17:08
…ring.

GitHub's notebook renderer resolves relative image paths via
raw.githubusercontent.com, which serves Git LFS pointer files as
text/plain instead of actual image content. Replace relative paths
with absolute media.githubusercontent.com URLs that correctly serve
LFS content. SVG references (not in LFS) are left as relative paths.
@brycelelbach brycelelbach force-pushed the fix/notebook-images-lfs branch from 5e992ba to f8cfe06 Compare March 30, 2026 17:18
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.

2 participants