feat: compress non-transparent PNGs as JPGs and allow larger dimensions

This commit is contained in:
dwelle
2021-11-22 17:39:59 +01:00
parent b6ef953dc9
commit bd953a6287
9 changed files with 186 additions and 26 deletions
+1 -5
View File
@@ -199,11 +199,7 @@ export const encodeFilesForUpload = async ({
});
if (buffer.byteLength > maxBytes) {
throw new Error(
t("errors.fileTooBig", {
maxSize: `${Math.trunc(maxBytes / 1024 / 1024)}MB`,
}),
);
throw new Error(t("errors.fileTooBig"));
}
processedFiles.push({