Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Change JPEG compression level of image files uploaded to WordPress. Source:
//* 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