Skip to content

Localize tutorial card images and convert to WebP - #257

Merged
flying-sheep merged 2 commits into
mainfrom
fix/localize-tutorial-card-images
Aug 11, 2026
Merged

Localize tutorial card images and convert to WebP#257
flying-sheep merged 2 commits into
mainfrom
fix/localize-tutorial-card-images

Conversation

@Zethson

@Zethson Zethson commented Aug 11, 2026

Copy link
Copy Markdown
Member

Closes #21.

What

Replaces all 10 external image URLs in the learn page tutorial cards with local WebP files stored in static/img/learn/. Also converts the 4 pre-existing PNGs in that directory to WebP.

Why

  • 4 of the 8 external URLs were already 404 (scanpy-tutorials.readthedocs.io, squidpy.readthedocs.io images)
  • The remaining external URLs (muon-tutorials, scirpy) still worked but pointed at auto-generated notebook output filenames that can change on any doc rebuild
  • Modern sphinx/jupyter-book docs use hash-based image names, making any external URL inherently fragile

Also

Expands the convert-to-webp pre-commit hook from static/img/blog/ to also cover static/img/learn/, so future image additions are converted automatically.

Replaces all external image URLs in the learn page tutorial cards with
local WebP files. 4 of the 8 external URLs were already returning 404
(scanpy-tutorials.readthedocs.io and squidpy.readthedocs.io images);
the muon-tutorials and scirpy ones still worked but were fragile.

Also converts the 4 pre-existing PNG learn images to WebP and expands
the pre-commit convert-to-webp hook to cover static/img/learn/ so future
additions are handled automatically.

Closes #21
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for jade-cajeta-1bcca0 ready!

Name Link
🔨 Latest commit 29d1334
🔍 Latest deploy log https://app.netlify.com/projects/jade-cajeta-1bcca0/deploys/6a7b1a096da9480008e307d6
😎 Deploy Preview https://deploy-preview-257--jade-cajeta-1bcca0.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Zethson
Zethson requested a review from flying-sheep August 11, 2026 12:51
@Zethson

Zethson commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

This comes at the slight cost of us potentially having to update images in two places but I think it's safer.

@flying-sheep flying-sheep 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.

nice! I only did blog at first now since those were huge photographs, but this makes a lot of sense!

@flying-sheep
flying-sheep merged commit 6f1a7c8 into main Aug 11, 2026
6 checks passed
@flying-sheep
flying-sheep deleted the fix/localize-tutorial-card-images branch August 11, 2026 13:36
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.

image handling for tutorial cards

2 participants