Spaces:
Running
Running
Update lib/converter.js
Browse files- lib/converter.js +1 -1
lib/converter.js
CHANGED
@@ -6,7 +6,7 @@ function convertWebpToPng(input) {
|
|
6 |
try {
|
7 |
if (typeof input === "string") {
|
8 |
const response = await fetch(input);
|
9 |
-
const images = await response.
|
10 |
const converting = await sharp(images);
|
11 |
const converted = converting.toFormat('png').png({ quality: 90 }).toBuffer();
|
12 |
resolve(converted);
|
|
|
6 |
try {
|
7 |
if (typeof input === "string") {
|
8 |
const response = await fetch(input);
|
9 |
+
const images = await response.arrayBuffer();
|
10 |
const converting = await sharp(images);
|
11 |
const converted = converting.toFormat('png').png({ quality: 90 }).toBuffer();
|
12 |
resolve(converted);
|