Skip to content

Commit

Permalink
fix: add avif mediatype (#1832)
Browse files Browse the repository at this point in the history
  • Loading branch information
liviaalmeida authored Aug 28, 2024
1 parent d2ed490 commit 38002cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vike/node/runtime/renderPage/inferMediaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type MediaType = null | {
mediaType:
| 'text/javascript'
| 'text/css'
| 'image/avif'
| 'image/jpeg'
| 'image/png'
| 'image/webp'
Expand Down Expand Up @@ -68,6 +69,9 @@ function inferMediaType(href: string): MediaType {
if (href.endsWith('.svg')) {
return { assetType: 'image', mediaType: 'image/svg+xml' }
}
if (href.endsWith('.avif')) {
return { assetType: 'image', mediaType: 'image/avif' }
}

// Fonts
if (href.endsWith('.ttf')) {
Expand Down

0 comments on commit 38002cb

Please sign in to comment.