diff --git a/vike/node/runtime/renderPage/inferMediaType.ts b/vike/node/runtime/renderPage/inferMediaType.ts index fbd4647e40f..f745cf8d763 100644 --- a/vike/node/runtime/renderPage/inferMediaType.ts +++ b/vike/node/runtime/renderPage/inferMediaType.ts @@ -21,6 +21,7 @@ type MediaType = null | { mediaType: | 'text/javascript' | 'text/css' + | 'image/avif' | 'image/jpeg' | 'image/png' | 'image/webp' @@ -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')) {