We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aba6b96 commit 60d59f9Copy full SHA for 60d59f9
README.md
@@ -58,10 +58,12 @@ tinify.fromFile("unoptimized.png").resize({
58
}).toFile("thumbnail.jpg");
59
60
// Convert format
61
-tinify.fromFile("photo.jpg").convert({ type: ["image/webp", "image/png"] })
62
- .result().extension().then(ext => {
63
- return tinify.fromFile("photo.jpg").toFile("photo." + ext);
64
- });
+const source = tinify.fromFile("panda-sticker.jpg");
+const converted = source.convert({type:["image/webp","image/png"]});
+const extension = converted.result().extension();
+extension.then(ext => {
65
+ converted.toFile("panda-sticker." + ext);
66
+})
67
68
// Preserve metadata
69
tinify.fromFile("original.jpg")
0 commit comments