Skip to content

Commit

Permalink
Add JPEG2000 file format support; fixes #1474
Browse files Browse the repository at this point in the history
Fix AVIF file format support; thanks @jessehattabaugh
  • Loading branch information
ryanblock committed Jan 17, 2024
1 parent 65bbc12 commit 321f8fe
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
9 changes: 7 additions & 2 deletions _changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@

### Added

- Added `image/avif` to binary types
- Added JPEG2000 file format support; fixes #1474


### Fixed

- Fixed AVIF file format support; thanks @jessehattabaugh

---

## [6.0.5] 2024-01-11

### Added

- Added `image/avif` to mime types
- Added AVIF file format support

---

Expand Down
4 changes: 4 additions & 0 deletions scripts/common-mime-type-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ module.exports = [
'image/jp2',
'image/jpeg',
'image/jpg',
'image/jpg2',
'image/jpm',
'image/jpx',
'image/pjpeg',
'image/png',
'image/svg+xml',
Expand Down Expand Up @@ -100,6 +103,7 @@ module.exports = [
'text/x-vcalendar',
'text/x-vcard',
'text/xml',
'video/mj2',
'video/mp4',
'video/webm',
'video/x-ms-asf',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/binary-extensions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/lib/binary-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ module.exports = [
'image/avif',
'image/bmp',
'image/gif',
'image/heic',
'image/heic-sequence',
'image/heif',
'image/heic',
'image/heif-sequence',
'image/heif',
'image/jp2',
'image/jpeg',
'image/jpg',
'image/jpg2',
'image/png',
'image/tiff',
'image/vnd.microsoft.icon',
Expand All @@ -41,13 +44,14 @@ module.exports = [
'audio/x-midi',
'audio/x-wav',
// Video
'video/3gpp-tt',
'video/3gpp',
'video/3gpp2',
'video/3gpp-tt',
'video/h264',
'video/h265',
'video/h266',
'video/jpeg2000',
'video/mj2',
'video/mp2t',
'video/mp4',
'video/mpeg',
Expand Down
5 changes: 5 additions & 0 deletions src/lib/common-mime-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ module.exports = {
jpeg: `${c}/jpeg`,
jpg: `${c}/jpeg`,
jpe: `${c}/jpeg`,
jpm: `${c}/jpm`,
jpx: `${c}/jpx`,
jpf: `${c}/jpx`,
png: `${c}/png`,
svg: `${c}/svg+xml`,
svgz: `${c}/svg+xml`,
Expand Down Expand Up @@ -126,6 +129,8 @@ module.exports = {
dic: `${f}/x-c`,
vcs: `${f}/x-vcalendar`,
vcf: `${f}/x-vcard`,
mj2: `${g}/mj2`,
mjp2: `${g}/mj2`,
mp4: `${g}/mp4`,
mp4v: `${g}/mp4`,
mpg4: `${g}/mp4`,
Expand Down

0 comments on commit 321f8fe

Please sign in to comment.