Using a filter for jpg_quality will hellp you to set your quality for uplaoded images.
add_filter('jpeg_quality', create_function('$n', 'return 70;'));
In most good implementations of Image Optimization you can find a various usae of ImageOptimization tools such as optimng/jpegtran etc, there a lot of plugins that help you to do that.