Skip to content

Instantly share code, notes, and snippets.

@sunnyratilal
Forked from thomasgriffin/gist:4262025
Last active December 17, 2015 17:59
Show Gist options
  • Save sunnyratilal/5650353 to your computer and use it in GitHub Desktop.
Save sunnyratilal/5650353 to your computer and use it in GitHub Desktop.
<?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 image_full_quality( $quality ) {
return 100;
}
add_filter( 'jpeg_quality', 'image_full_quality' );
add_filter( 'wp_editor_set_quality', 'image_full_quality' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment