Outsystems implementation of https://github.com/Donaldcwl/browser-image-compression (credit to him)
For automatic resizing image to targeted size in MB
The 5 parameters :
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)