forked from external-repos/squoosh
Fix WebP sniffing some more
This commit is contained in:
@@ -282,7 +282,7 @@ export const codecs = {
|
||||
webp: {
|
||||
name: 'WebP',
|
||||
extension: 'webp',
|
||||
detectors: [/^RIFF....WEBPVP8[LX ]/],
|
||||
detectors: [/^RIFF....WEBPVP8[LX ]/s],
|
||||
dec: () => instantiateEmscriptenWasm(webpDec, webpDecWasm),
|
||||
enc: () => instantiateEmscriptenWasm(webpEnc, webpEncWasm),
|
||||
defaultEncoderOptions: {
|
||||
|
||||
@@ -95,7 +95,7 @@ const magicNumberMapInput = [
|
||||
[/^I I/, 'image/tiff'],
|
||||
[/^II*/, 'image/tiff'],
|
||||
[/^MM\x00*/, 'image/tiff'],
|
||||
[/^RIFF....WEBPVP8[LX ]/, 'image/webp'],
|
||||
[/^RIFF....WEBPVP8[LX ]/s, 'image/webp'],
|
||||
[/^\xF4\xFF\x6F/, 'image/webp2'],
|
||||
[/^\x00\x00\x00 ftypavif\x00\x00\x00\x00/, 'image/avif'],
|
||||
[/^\xff\x0a/, 'image/jxl'],
|
||||
|
||||
Reference in New Issue
Block a user