I think a custom Java action would be the way. Stackoverflow to the resque: https://stackoverflow.com/questions/18573774/how-to-reduce-an-image-file-size-before-uploading-to-a-server
Regards,
Ronald
Yeah, for client side you make a widget using something like https://github.com/brunobar79/J-I-C (this one we’ve used with html5 camera, but you can also use it on image files) and then upload the compressed image. For server side compression is just regular java stuff