Skip to content

Instantly share code, notes, and snippets.

@someguy9
Last active October 25, 2022 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save someguy9/aad1f1dcfb7f1efd43eb3f6950669efb to your computer and use it in GitHub Desktop.
Save someguy9/aad1f1dcfb7f1efd43eb3f6950669efb to your computer and use it in GitHub Desktop.
Increase the image threshold for WordPress auto resize feature
<?php
// Increase the image resize threshold to 4000px on the longest edge
function smartwp_big_image_size_threshold( $threshold ) {
return 4000;
}
add_filter( 'big_image_size_threshold', 'smartwp_big_image_size_threshold', 999, 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment