mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-13 09:17:20 +00:00
fix broken file renaming for file names with dot
remove grouping in regex
This commit is contained in:
@@ -107,7 +107,7 @@ async function compressImage(
|
|||||||
|
|
||||||
return new File(
|
return new File(
|
||||||
[compressedData],
|
[compressedData],
|
||||||
sourceFilename.replace(/\..+$/, '.' + encoder.extension),
|
sourceFilename.replace(/.[^.]*$/, `.${encoder.extension}`),
|
||||||
{ type: encoder.mimeType },
|
{ type: encoder.mimeType },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user