Add avif and webm to the list of supported extensions - #2999
Conversation
|
|
Related PR in the default theme: jupyter-book/myst-theme#926 |
There was a problem hiding this comment.
Pull request overview
This PR updates myst-cli’s recognized media extensions so AVIF images (.avif) and WebM videos (.webm) are treated as supported assets during site builds, addressing the “Unsupported image extension” error described in #2996.
Changes:
- Add
.avifand.webmto theImageExtensionsenum and include.webminKNOWN_VIDEO_EXTENSIONS. - Extend the default site-build (
WEB_IMAGE_EXTENSIONS) allowlist to include AVIF and WebM.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/myst-cli/src/utils/resolveExtension.ts | Adds avif/webm to the canonical extension lists used across CLI transforms. |
| packages/myst-cli/src/process/site.ts | Allows .avif and .webm by default for site processing to avoid unsupported-extension errors. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| export const KNOWN_IMAGE_EXTENSIONS = Object.values(ImageExtensions); | ||
| export const KNOWN_VIDEO_EXTENSIONS = ['.mp4', '.mov', '.avi']; | ||
| export const KNOWN_VIDEO_EXTENSIONS = ['.mp4', '.mov', '.avi', '.webm']; |
Fixes #2996