Skip to content

Introduce mediatypes directory with image type data#27168

Merged
caugner merged 32 commits intomainfrom
6971-image-formats
Dec 9, 2025
Merged

Introduce mediatypes directory with image type data#27168
caugner merged 32 commits intomainfrom
6971-image-formats

Conversation

@caugner
Copy link
Contributor

@caugner caugner commented Jun 27, 2025

Summary

Introduces the mediatypes top level directory, and adds image types under mediatypes.image.

Test results and supporting details

Sources:

Related issues

Part of #6971.

@github-actions github-actions bot added schema Isses or pull requests regarding the JSON schema files used in this project. infra Infrastructure issues (npm, GitHub Actions, releases) of this project docs Issues or pull requests regarding the documentation of this project. size:l [PR only] 101-1000 LoC changed labels Jun 27, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jun 27, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

@ddbeck
Copy link
Contributor

ddbeck commented Jul 1, 2025

Something I think is essential to landing this would be a documented (and very sharp) definition of what qualifies as support for these features. Though they implicate support for HTML, CSS, and web API features, the new top-level namespace implies a different scope. It'd be great to be explicit about what that scope is.

(Automated tests could also serve as a definition of supported, but I don't know how practical that is.)

@queengooborg queengooborg added the semver-minor-bump A change that adds a new, non-potentially-breaking feature for consumers label Aug 14, 2025
@caugner
Copy link
Contributor Author

caugner commented Aug 26, 2025

We discussed this in today's BCD meeting, and agreed to (1) compare the data with caniuse to spot any important omissions, and to also (2) ask @Fyrd if and how he would merge this data into the existing caniuse data for image formats.

Copy link
Contributor Author

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Compared the data with Can I use.

"version_added": "23"
},
{
"version_added": "17",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to https://caniuse.com/webp, Chrome 9 added WebP support, but I couldn't confirm this with my own tests. It was possibly only behind a flag.

@caugner caugner requested review from a team as code owners October 14, 2025 10:01
@foolip
Copy link
Contributor

foolip commented Oct 14, 2025

What's being proposed here for image formats looks sensible to me. Even though images can be used in many contexts (<img>, CSS backgrounds, ImageDecoder, canvas toBlob(), favicons, etc.) I think it basically make sense to talk about support for AVIF as one thing, and use notes of subfeatures for things of interest that don't work.

For audio and video codecs, it's a bit trickier since it's a combination of container and multiple codecs. https://caniuse.com/webm tracks a specific combination of container and codecs, but https://caniuse.com/av1 tracks a specific video codec without reference to a container. There's also a more complicated history of support for codecs in specific containers, having decode-only vs. decode and encode, etc.

But this PR isn't about audio and video codecs, so we don't need to settle those questions here.

@caugner caugner removed the request for review from a team October 15, 2025 14:34
@github-actions github-actions bot added the linter Issues or pull requests regarding the tests / linter of the JSON files. label Dec 8, 2025
@caugner caugner changed the title Introduce media-types directory with image type data Introduce mediatypes directory with image type data Dec 8, 2025
@caugner caugner requested a review from Elchi3 December 8, 2025 15:29

- `elements` - Elements

### [`mediatypes`](./mediatypes)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI @ddbeck @Elchi3 I have renamed media-types to mediatypes to avoid the extra work of mapping the dash ({ media-types: { … }} is not valid).

@caugner caugner force-pushed the 6971-image-formats branch from 0082507 to d2e33a7 Compare December 8, 2025 15:57
@caugner caugner requested a review from Elchi3 December 8, 2025 16:26
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

LGTM.
Before merging I would like to discuss in tomorrow's BCD call about how we're feeling about this now and if it presents a minor(?) version bump. Last time we introduced a new top-level folder, it was in a breaking BCD 6.0.0 release (#26291).

Co-authored-by: Daniel D. Beck <daniel@ddbeck.com>
@caugner caugner added the meeting agenda Issues or pull requests in need of discussion in a project meeting. label Dec 9, 2025
@caugner caugner removed the meeting agenda Issues or pull requests in need of discussion in a project meeting. label Dec 9, 2025
@caugner caugner merged commit 45f409d into main Dec 9, 2025
14 checks passed
@caugner caugner deleted the 6971-image-formats branch December 9, 2025 17:43
@github-project-automation github-project-automation bot moved this from Todo to Done in BCD meeting agenda Dec 9, 2025
@mdn-bot mdn-bot mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Issues or pull requests regarding the documentation of this project. infra Infrastructure issues (npm, GitHub Actions, releases) of this project linter Issues or pull requests regarding the tests / linter of the JSON files. schema Isses or pull requests regarding the JSON schema files used in this project. scripts Issues or pull requests regarding the scripts in scripts/. semver-minor-bump A change that adds a new, non-potentially-breaking feature for consumers size:l [PR only] 101-1000 LoC changed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants