In a project, I’m using this lib https://fengyuanchen.github.io/compressorjs/ ; it allows to resize/compress.
Used with Uploader component.
Though, to use it before it’s being uploaded and to show the final size properly, you need to create your own component based on QUploaderBase
(purpose is to overwrite __add_files
method, so you can call the parent method once you resize/compressed the files). I don’t think there is a better way, but it works fine for me.