mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 11:09:41 +00:00
Update src/lib/util.ts
Co-authored-by: Ingvar Stepanyan <rreverser@google.com>
This commit is contained in:
@@ -104,7 +104,7 @@ const magicNumberToMimeType = new Map<RegExp, string>([
|
|||||||
[/^II*/, 'image/tiff'],
|
[/^II*/, 'image/tiff'],
|
||||||
[/^MM\x00*/, 'image/tiff'],
|
[/^MM\x00*/, 'image/tiff'],
|
||||||
[/^RIFF....WEBPVP8[LX ]/, 'image/webp'],
|
[/^RIFF....WEBPVP8[LX ]/, 'image/webp'],
|
||||||
[/^\x00\x00\x00\x20\x66\x74\x79\x70\x61\x76\x69\x66\x00\x00\x00\x00/, 'image/avif'],
|
[/^\x00\x00\x00 ftypavif\x00\x00\x00\x00/, 'image/avif'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export async function sniffMimeType(blob: Blob): Promise<string> {
|
export async function sniffMimeType(blob: Blob): Promise<string> {
|
||||||
|
|||||||
Reference in New Issue
Block a user