https://digitalfortress.tech/js/compress-images-with-javascript/
Compress images with Javascript