feat: add ico MIME type and heif->heic extension alias

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-31 10:08:46 +02:00
co-authored by Claude Sonnet 5
parent 2b2d8a9e6f
commit 39b296f5d3
2 changed files with 24 additions and 1 deletions
+4 -1
View File
@@ -9,6 +9,7 @@ const OUTPUT_MIME_TYPES = {
tiff: 'image/tiff',
avif: 'image/avif',
bmp: 'image/bmp',
ico: 'image/x-icon',
pdf: 'application/pdf',
html: 'text/html',
txt: 'text/plain',
@@ -39,7 +40,9 @@ const UNDETECTABLE_TEXT_FORMATS = {
};
function normalizeFormat(format) {
return format === 'jpg' ? 'jpeg' : format;
if (format === 'jpg') return 'jpeg';
if (format === 'heif') return 'heic';
return format;
}
export async function resolveInputFormat(filePath, declaredFormat) {