Created
May 26, 2020 20:30
-
-
Save RyanNutt/c36df6bfbbb4dcd907c48c5a088fd6e1 to your computer and use it in GitHub Desktop.
WordPress plugin to turn off auto creation of scaled images
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 | |
/** | |
* Plugin Name: Disable Scaled Images | |
* Plugin URI: https://www.nutt.net | |
* Description: One liner to turn off automatic scaled image creation for large images | |
* Version: 0.1.0 | |
* Requires at least: 5.2 | |
* Requires PHP: 7.2 | |
* Author: Ryan Nutt | |
* Author URI: https://www.nutt.net | |
* License: GPL v2 or later | |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* Really this could be added to your theme functions.php file, but I was working on a site that | |
* was using a stock theme and I didn't want to go through the effort of creating a child theme | |
* just for this one thing. Making a baby plugin seemed easier. | |
*/ | |
add_filter('big_image_size_threshold', '__return_false'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment