What does WordPress media uploader do to image files on upload?

I think that WordPress only apply jpeg compression and the quality can be only change by code. For example, add this code to the functions.php file of your theme or in a plugin:

add_filter('jpeg_quality', function($arg){
    //Set compression quality from 0 to 100
    return 100;
});