Using the following snippet, you will be able to prevent WordPress from compressing JPG files.

Snippet Source/Credit: WP Snippets