How to Increase or Decrease Default WordPress JPEG Image Compression

Images are an important part of blogs and websites. It affects SEO in different ways. It is recommended to use images in blog posts with proper alt and title tags. If you are not sure why you should read how to do image SEO. Adding image in a blog post is necessary, but you should also know that WordPress has a default compression process for images we upload.

WordPress has built-in support to compress images so that it take less space on your web hosting. It also helps to increase the load time of your blog. If you want it to more compress images, you can increase or decrease this compression depending on your need. By default, WordPress automatically compress images at 90% quality. But you can change the quality according to your need. If you are a photographer and using WordPress to show your photographs gallery, compression will result in

By default, WordPress automatically compress images at 90% quality. But you can change the quality according to your need. If images are just for representational, and it does not matter if the quality is little down, you can reduce this compression to keep your blog posts faster. Load time affects SEO. So, you will be improving the SEO of your blog by doing this. I also recommend you to read how to speed up WordPress blog.

If you are a photographer and using WordPress to show your photographs gallery, compression will result in loss of photo quality. So, you can change the compression ratio to get better quality photos after uploading.

Advertisement

By default, WordPress automatically compress images at 90% quality. But you can change the quality according to your need. If you are a photographer and using WordPress to show your photographs gallery, compression will result in loss of photo quality. So, you can change the compression ratio to get better quality photos after uploading.

There is nothing complicated if you want to change the compression of images. You only need to add a single line of code in your theme’s functions.php file. If you want this only for a specific plugin, add the code only within the plugin.

Increase Default WordPress JPEG Image Compression

To keep it on best quality, change this number to 100.

1

add_filter('jpeg_quality',function($arg){return100;});

Decrease Default WordPress JPEG Image Compression

To decrease the compression, just reduce the number. You should not change it to less than 50. Others, you will see the very bad quality of images on your blog.

1

add_filter('jpeg_quality',function($arg){return70;});

Setting the 100 in the code means, WordPress will compress the image at the highest quality. 100 is recommended only for photographers who want their best photos to be uploaded. We can change the value from 70-100. Using value less than 60 will result in lost of quality of images.

In this way, you can change the compression of images and control the quality of images. If you want to compress images without losing the quality, you can use image compression WordPress plugins. There are few other plugins to optimize images of your blog post.

Try this code and let me know if it works for you. Do not forget to leave your comment and share this post with friends.

UseThisTip is one of the best tech blogs that try to solve your computer and internet related
problems. You can find best how to technology articles here. We post best computer tricks and
internet tricks along with website review and mobile app reviews. We also do software reviews
and also try to give you list of best alternative software and apps so that you do not need to
buy paid software or app.

About

UseThisTip covers everything related to tech and web design. We have interesting tips and tricks of Software, apps, WordPress and More