Skip to content

Add avif and webm to the list of supported extensions - #2999

Open
goekce wants to merge 2 commits into
jupyter-book:mainfrom
goekce:main
Open

Add avif and webm to the list of supported extensions#2999
goekce wants to merge 2 commits into
jupyter-book:mainfrom
goekce:main

Conversation

@goekce

@goekce goekce commented Jul 10, 2026

Copy link
Copy Markdown

Fixes #2996

Copilot AI review requested due to automatic review settings July 10, 2026 13:17
@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 63da9d4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment thread packages/myst-cli/src/utils/resolveExtension.ts
@goekce

goekce commented Jul 10, 2026

Copy link
Copy Markdown
Author

Related PR in the default theme: jupyter-book/myst-theme#926

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .avif and .webm to the ImageExtensions enum and include .webm in KNOWN_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'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

.avif and .webm extension support

3 participants