Before I get a thousand people bombarding me with it, I am NOT TALKING ABOUT THE HEIGHT AND WIDTH. I'm looking to compress a jpeg lossily, and be able to control the quality of the lossy compression.
The canvas element's toBlob function is really nice, and lets you set the quality for lossy compression when it generates the resulting image file. In an ideal world, this should be all I need, however the quality parameter is not supported in all browsers, and most irritatingly not in several common mobile browsers, which is specifically where I need it.
I've been trying to find some javascript library to use as a fallback in situations where I can't use canvas.toBlob, however almost every library out there seems to use it exclusively, and I can't find any that has a fallback.
Suggestions would be appreciated.