Skip to content

Instantly share code, notes, and snippets.

@BronsonQuick
Created February 7, 2013 04:56
Show Gist options
  • Save BronsonQuick/4728665 to your computer and use it in GitHub Desktop.
Save BronsonQuick/4728665 to your computer and use it in GitHub Desktop.
Make the WordPress Image Quality to be 100% quality
<?php
/**
* Filters the image quality for thumbnails to be at the highest ratio possible.
*
* Supports the new 'wp_editor_set_quality' filter added in WP 3.5.
*
* @since 1.0.0
*
* @param int $quality The default quality (90)
* @return int $quality Amended quality (100)
*/
function sennza_image_full_quality( $quality ) {
return 100;
}
add_filter( 'jpeg_quality', 'sennza_image_full_quality' );
add_filter( 'wp_editor_set_quality', 'sennza_image_full_quality' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment