Demo entry 6640600

tinify

   

Submitted by anonymous on Sep 12, 2017 at 11:26
Language: JavaScript. Code size: 350 Bytes.

const tinify = require("tinify");
	tinify.key = "poM-mYRjksVtynlzHJRUTnB3XWHz-PNl";
let pro = tinify.fromFile("unoptimized.png").toFile("unoptimized1.png");
let start = new Date().getTime();
	pro.then((data) => {
let end = new Date().getTime();
	console.log('success', end - start);
	console.log(data)
}, (error) => {
	console.log(error)
})

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).