Essential information contained in an original image may be deteriorated if the image is highly compressed without considering the importance of each region in the image. Assuming that textual information contained in an image is important, we propose a method for image compression while maintaining the readability of characters by automatic evaluation for character readability. The proposed automatic evaluation classifies character images into either readable or unreadable images by using machine learning, and the proposed evaluation is used in quantization table optimization in order to ensure character readability while minimizing the overall image data size. In addition, less important information in view of image recognition in the background region is reduced. By several subjective experiments, we confirm that the proposed method maintains character readability relative to the standard JPEG compression method while retaining the required image quality of background regions in order to maintain sufficient recognition of content and situations.