Last active
November 2, 2018 19:51
-
-
Save thomasgriffin/4262025 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 | |
add_filter( 'jpeg_quality', 'tgm_image_full_quality' ); | |
add_filter( 'wp_editor_set_quality', 'tgm_image_full_quality' ); | |
/** | |
* 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 tgm_image_full_quality( $quality ) { | |
return 100; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment