Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e1e70dd
Add image formats
caugner Jun 27, 2025
be139cd
Add new media top-level object to README
caugner Aug 14, 2025
cfc75b4
Merge branch 'main' into 6971-image-formats
caugner Aug 14, 2025
e6eb726
Merge branch 'main' into 6971-image-formats
caugner Aug 26, 2025
6381f06
Chromium unshipped JPEG XL
caugner Aug 26, 2025
fdf5942
Remove GIF animation (same support as parent)
caugner Aug 26, 2025
d74068b
Add HEIC/HEIF bugs
caugner Aug 26, 2025
39ed6e2
Rename HEIC to HEIF
caugner Aug 26, 2025
08676cd
Refine Safari data for AVIF
caugner Aug 26, 2025
71439fb
Safari doesn't support JPEG XL with animated images
caugner Aug 26, 2025
aabc88e
Add Edge/IE image format data
caugner Aug 26, 2025
9b5bc6e
Add WebP subfeatures
caugner Aug 26, 2025
cedc106
Refine Opera data for WebP
caugner Aug 26, 2025
a13d724
Merge branch 'main' into 6971-image-formats
caugner Oct 14, 2025
f870710
Merge branch 'main' into 6971-image-formats
caugner Nov 18, 2025
67ca958
Move {media.formats => media-types}.image
caugner Dec 2, 2025
fc0bca8
Split media-types/image.json
caugner Dec 2, 2025
7386b16
Add spec url for BMP (Bitmap file)
caugner Dec 2, 2025
1757cd0
Merge branch 'main' into 6971-image-formats
caugner Dec 2, 2025
ab60b1c
Add media-types to code snippets, generate-types, data-folders
caugner Dec 8, 2025
a73cfff
Fix accidental "false" string
caugner Dec 8, 2025
d604185
refactor: rename {media-types => mediatypes}
caugner Dec 8, 2025
7210ced
Fix some media-types versions
caugner Dec 8, 2025
740db78
Fix notes array with single note
caugner Dec 8, 2025
c8eb716
Fix spec URL
caugner Dec 8, 2025
83f00a1
Add missing WebView entries for media types
caugner Dec 8, 2025
abdd0ec
Fix AVIF animation version for Edge
caugner Dec 8, 2025
8a19b48
Merge branch 'main' into 6971-image-formats
caugner Dec 8, 2025
c2b100b
Add fragments to media types spec URLs
caugner Dec 8, 2025
3cb3649
Add spec URL exceptions for media types
caugner Dec 8, 2025
d2e33a7
Replace APNG spec URL
caugner Dec 8, 2025
365d630
Apply suggestions from code review
caugner Dec 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ data:mathml:
- changed-files:
- any-glob-to-any-file:
- "mathml/**"
data:mediatypes:
- changed-files:
- any-glob-to-any-file:
- "mediatypes/**"
data:svg:
- changed-files:
- any-glob-to-any-file:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/system-file-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- "!javascript/**.json"
- "!manifests/**.json"
- "!mathml/**.json"
- "!mediatypes/**.json"
- "!svg/**.json"
- "!webassembly/**.json"
- "!webdriver/**.json"
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"/javascript/*.json",
"/manifests/*.json",
"/mathml/*.json",
"/mediatypes/*.json",
"/svg/*.json",
"/webdriver/*.json",
"/webextensions/*.json"
Expand Down
2 changes: 1 addition & 1 deletion .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"prefix": ["bcd", "browser-compat"],
"body": [
"{",
" \"${1|api,css,html,http,javascript,manifests,mathml,svg,webassembly,webdriver,webextensions|}\": {",
" \"${1|api,css,html,http,javascript,manifests,mathml,mediatypes,svg,webassembly,webdriver,webextensions|}\": {",
" \"${2:${TM_FILENAME_BASE}}\": {",
" \"__compat\": {",
" \"mdn_url\": \"${3:mdn-url}\",",
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ Data for [MathML](https://developer.mozilla.org/en-US/docs/Web/MathML) features,

- `elements` - Elements

### [`mediatypes`](./mediatypes)
Copy link
Copy Markdown
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).


Data for [Media types](https://developer.mozilla.org/docs/Web/HTTP/Guides/MIME_types), including:

- `mediatypes/image` - Image types

An image type is considered supported if it displays correctly when used in an `<img>` element's `src` attribute, or as a CSS `background-image`.

### [`svg`](./svg)

Data for [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG) features, including:
Expand Down
9 changes: 9 additions & 0 deletions lint/linter/test-spec-urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ const specsExceptions = [
'https://github.com/WebAssembly/function-references/blob/main/proposals/function-references/Overview.md',
'https://github.com/WebAssembly/js-promise-integration',
'https://github.com/WebAssembly/branch-hinting/blob/main/proposals/branch-hinting/Overview.md',

// Media types
'https://developers.google.com/speed/webp/docs/riff_container',
'https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specification',
'https://jpeg.org/jpeg/',
'https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/',
'https://www.iso.org/standard/89035.html',
'https://www.rfc-editor.org/rfc/rfc7903',
'https://www.w3.org/Graphics/GIF/spec-gif87.txt',
];

const allowedSpecURLs = [
Expand Down
86 changes: 86 additions & 0 deletions mediatypes/image/avif.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"mediatypes": {
"image": {
"avif": {
"__compat": {
"description": "AV1 Image File Format (AVIF)",
"mdn_url": "https://developer.mozilla.org/docs/Web/Media/Guides/Formats/Image_types#avif_image",
"spec_url": "https://aomediacodec.github.io/av1-avif/#general",
"support": {
"chrome": {
"version_added": "85"
},
"chrome_android": "mirror",
"edge": {
"version_added": "121"
},
"firefox": {
"version_added": "93"
},
"firefox_android": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": [
{
"version_added": "16.4"
},
{
"version_added": "16.1",
"version_removed": "16.4",
"partial_implementation": true,
"notes": [
"Only on macOS Ventura. Big Sur and Monterey are not supported.",
"Noise synthesis is not supported."
]
}
],
"safari_ios": {
"version_added": "16.1"
},
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
},
"animation": {
"__compat": {
"description": "Animation support (AVIF Image sequences)",
"spec_url": "https://aomediacodec.github.io/av1-avif/#image-sequences",
"support": {
"chrome": {
"version_added": "85"
},
"chrome_android": "mirror",
"edge": {
"version_added": "121"
},
"firefox": {
"version_added": "113"
},
"firefox_android": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": "16.1"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
}
}
}
}
}
45 changes: 45 additions & 0 deletions mediatypes/image/bmp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"mediatypes": {
"image": {
"bmp": {
"__compat": {
"description": "Bitmap file (BMP)",
Comment thread
caugner marked this conversation as resolved.
Outdated
"mdn_url": "https://developer.mozilla.org/docs/Web/Media/Guides/Formats/Image_types#bmp_bitmap_file",
"spec_url": "https://www.rfc-editor.org/rfc/rfc7903#section-1.2",
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "1"
},
"firefox_android": "mirror",
"ie": {
"version_added": "1"
},
"opera": {
"version_added": "≤2"
},
"opera_android": "mirror",
"safari": {
"version_added": "1"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
}
}
}
}
56 changes: 56 additions & 0 deletions mediatypes/image/gif.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"mediatypes": {
"image": {
"gif": {
"__compat": {
"description": "Graphics Interchange Format (GIF)",
"mdn_url": "https://developer.mozilla.org/docs/Web/Media/Guides/Formats/Image_types#gif_graphics_interchange_format",
"spec_url": [
"https://www.w3.org/Graphics/GIF/spec-gif87.txt#top",
"https://www.w3.org/Graphics/GIF/spec-gif89a.txt#top"
],
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "1"
},
"firefox_android": "mirror",
"ie": [
{
"version_added": "2"
},
{
"version_added": "1",
"version_removed": "2",
"partial_implementation": true,
"notes": "Animation is not supported."
}
],
"opera": {
"version_added": "≤2"
},
"opera_android": "mirror",
"safari": {
"version_added": "1"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
}
}
}
}
39 changes: 39 additions & 0 deletions mediatypes/image/heif.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"mediatypes": {
"image": {
"heif": {
"__compat": {
"description": "High Efficiency Image File Format (HEIF)",
"spec_url": "https://www.iso.org/standard/89035.html#content",
"support": {
"chrome": {
"version_added": false,
"impl_url": "https://crbug.com/411125808"
},
"chrome_android": "mirror",
"edge": "mirror",
"firefox": {
"version_added": false,
"impl_url": "https://bugzil.la/1402293"
},
"firefox_android": "mirror",
"opera": "mirror",
"opera_android": "mirror",
"safari": {
"version_added": "17"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
}
}
}
}
44 changes: 44 additions & 0 deletions mediatypes/image/ico.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"mediatypes": {
"image": {
"ico": {
"__compat": {
"description": "Microsoft Windows Icon (ICO)",
Comment thread
caugner marked this conversation as resolved.
Outdated
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "1"
},
"firefox_android": "mirror",
"ie": {
"version_added": "5"
},
"opera": {
"version_added": "≤2"
},
"opera_android": "mirror",
"safari": {
"version_added": "1",
"version_removed": "2"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": false,
"deprecated": false
}
}
}
}
}
}
45 changes: 45 additions & 0 deletions mediatypes/image/jpeg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"mediatypes": {
"image": {
"jpeg": {
"__compat": {
"description": "Joint Photographic Experts Group Image (JPEG)",
Comment thread
caugner marked this conversation as resolved.
Outdated
"mdn_url": "https://developer.mozilla.org/docs/Web/Media/Guides/Formats/Image_types#jpeg_joint_photographic_experts_group_image",
"spec_url": "https://jpeg.org/jpeg/#content",
"support": {
"chrome": {
"version_added": "1"
},
"chrome_android": "mirror",
"edge": {
"version_added": "12"
},
"firefox": {
"version_added": "1"
},
"firefox_android": "mirror",
"ie": {
"version_added": "1"
},
"opera": {
"version_added": "≤2"
},
"opera_android": "mirror",
"safari": {
"version_added": "1"
},
"safari_ios": "mirror",
"samsunginternet_android": "mirror",
"webview_android": "mirror",
"webview_ios": "mirror"
},
"status": {
"experimental": false,
"standard_track": true,
"deprecated": false
}
}
}
}
}
}
Loading