Change the compression of jpeg images in WordPress

By default, WordPress compresses your images for better performance. Below we will see how you can increase or decrease it of .jpeg images in WordPress.

Whenever you upload a jpeg image to WorPress, the software will compress it to the quality of 90%. From WorPress 4.5, this number decreased to 82% to improve website performance for mobile users.Compress WordPress

Now if you are a photographer and want to display high quality images images on your website, then you can disable image compression in WordPress.

Let's see how:

All you need to do is copy and paste the code below into the functions.php. The file is in the theme that th.

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

By setting the price to 100, you are sure that WordPress will compress the image to its highest quality.

If you are not a photographer, you probably will not see a big difference in quality. But for those who work with high-quality images on a daily basis, the difference in quality is obvious.

But let's see what we can do for those who are not photographers and are more interested in the performance of their website:

If you want, you can further reduce the number to earn a few kbs of each image you upload to your site.

Copy and paste the following code into the functions.php file:

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

After these changes in image quality, you will need to run the plugin Regenerate Thumbnails.

 

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.082 registrants.

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).