Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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