Last active
May 31, 2017 20:24
-
-
Save jpmarchand/5b44f95ead34c6309a09 to your computer and use it in GitHub Desktop.
Change JPEG compression level of image files uploaded to WordPress. Source: http://www.wpbeginner.com/wp-tutorials/how-to-increase-or-decrease-wordpress-jpeg-image-compression/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Prevent JPEG compression | |
add_filter('jpeg_quality', function($arg){return 100;}); | |
//* JPEG compression level set to 75% | |
add_filter('jpeg_quality', function($arg){return 75;}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment