While searching for a way to change the default jpeg quality of generated thumbnails in WordPress, I came along this simple piece of code:
function jpeg_quality_filter($quality) { return 100; }
add_filter('jpeg_quality', 'jpeg_quality_filter');
Add to the functions.php file in your theme directory and change ’100′ to the desired jpeg compression value (higher is better).