Last active
May 22, 2019 01:39
-
-
Save joshbetz/9399b50dc4d47e774bd4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Plugin Name: Photon Lossy Compression | |
* Plugin URI: https://josh.blog/2015/01/lossy-compression-with-photon | |
* Description: Lossy compression of images using the Jetpack Photon CDN. | |
* Version: 1.0.0 | |
* Author: Josh Betz | |
* Author URI: https://josh.blog | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
*/ | |
// Photon: 80% jpeg quality | |
add_filter('jetpack_photon_pre_args', function( $args ) { | |
$args['quality'] = 80; | |
return $args; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment