If you use the original image file in posts it should remain the quality it was uploaded with, WP does not process it any further. If this original image’s size as displayed on the page is not its native size, any loss of quality is due to browser resizing and there’s nothing WP can do about it.
However, if the image in the post is one of the down sized images, there is likely loss of quality due to the down sizing process. This is done by the image editor installed on your server, not WP itself. In the specific case of JPEG images, the editor’s default image quality setting is 90. You could increase it to 100 through the ‘wp_editor_set_quality’ filter.
Unfortunately, this probably will not help quality much. Server image editor down sizing capability is generally seen as inadequate by those who are discriminating about image quality. At the same time, using quality 100 will significantly increase file size without a proportional gain in quality.
If you need to use down sized images and are unhappy with the resulting quality, your only option is to manually downsize to the correct size using a proper photo editing application. Replace the file WP created with your manual version via FTP. It’s impractical to do this for all images, but you might want to do this for images that are particularly important or particularly bad in quality.
Even with a good photo editor, image quality and small file size are at odds with each other. It will always be a compromise.