Outsystems implementation of https://github.com/Donaldcwl/browser-image-compression (all credit goes to him)
Resize Image to targeted MB size
The 5 parameters input :
MaxSize : targeted size of the image in MB
MaxWidthHeight : maximum allowed size to be changed because of the resizing
UseWebWorker : Use web worker or main thread
ShowComparison : show image comparison, before and after (cosmetic only)
ShowProgressBar : show progress bar of compression (cosmetic only)