I am using canvas fabric to screen shot the image and output as image , and then use ajax through php to send mail out. the mail send was really slow , like 40 sec pre mail . i notice the image file size i create is one take most time in the mail.
each mail contain 4 image and each image is around 200 kb , like 800kb more each.
i need to find a way to compress it down. it was always png : is lossless
var url = this.canvas.toDataURL();
i found out this https://www.npmjs.com/package/canvas-png-compression
it said CanvasPngCompression.replaceToDataURL() to replace toDataURL();
i cant get it work and how to use it ?
so is there anyway i can compress my canvas image size to 100kb ?? need some advice compress those image.