Compressing JPEGs on WordPress Without any Plug-in

Images are very important part of any website because they can attract more users to a site. However, unnecessarily large image file sizes can impact your site negatively by increasing the loading time of your site to a huge extent. WordPress can minimize the image quality for its better performance with or without using a plug-in. In this article, you will learn a simple way to increase or decrease the JPEG image sizes without using WordPress plug-ins.

When an image is uploaded on a WordPress site, its quality is reduced by default from 100% to 90%. Although WordPress allows you to further reduce it to 82%, but you can disable it by inserting the following line of code in functions.php file:

The WordPress image compression will be disabled if the value goes 100. You can utilise this code if you want to show high quality images.

In case if you are willing to reduce the image quality along with its size, you can set the value from 100 to 80 or further reduce it according to your custom requirements. Add the following code in functions.php file to enable this functionality:

User Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

    Get in Touch