Skip to content

Commit

Permalink
Add support for AVIF
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Sep 3, 2024
1 parent 3f7832f commit 1f556f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/js/media/media-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export function getImageMediaTypeFromFileName(path) {
switch (getFileNameExtension(path).toLowerCase()) {
case '.apng':
return 'image/apng';
case '.avif':
return 'image/avif';
case '.bmp':
return 'image/bmp';
case '.gif':
Expand Down Expand Up @@ -75,6 +77,8 @@ export function getFileExtensionFromImageMediaType(mediaType) {
switch (mediaType) {
case 'image/apng':
return '.apng';
case 'image/avif':
return '.avif';
case 'image/bmp':
return '.bmp';
case 'image/gif':
Expand Down

0 comments on commit 1f556f9

Please sign in to comment.