Optimus

Find answers, guides, and tutorials to optimize your images.

Optimize JPEGs in WordPress

Updated on November 5, 2021

During the creation of preview images, WordPress uses a default compression rate of 90 percent to optimize JPEG images - which is referred to as lossy compression. In WordPress 4.5, this number was further decreased to 82% to improve site performance for mobile users. This value is hard coded into the WordPress core, but can be changed using the filter jpeg_quality. The stronger the compression applied (smaller number), the worse the image quality, and the smaller the resulting file size will be.

Optimus automatically compresses JPEG images using a lossy compression quality of 82%. Therefore, if you're using WordPress's default JPEG compression value, that means that Optimus will take care of the compression of your original image while WordPress compresses your thumbnails.

Compression factor

Okay, so we learned that you can adjust the degree of compression. But which value should you pick for reducing the file size while keeping an acceptable image quality. There are many studies on this topic and an equally large number of different opinions: 80 to 85 percent compression lead to a decent "cost-benefit ratio". Some web designers claim that even 70 to 75 percent can look okay on modern monitors. This is a question where each user has to decide for himself and experiment with compression values in order to find a "happy medium" for his images.

And remember if you change the compression level you will need to regenerate your thumbnails.

KeyCDN uses cookies to make its website easier to use. Learn more