Skip to content

Instantly share code, notes, and snippets.

@jcamp
Forked from barbwiredmedia/remove-size.php
Created July 6, 2018 17:59
Show Gist options
  • Save jcamp/519c745384b73794e2dbe39c7fba86ec to your computer and use it in GitHub Desktop.
Save jcamp/519c745384b73794e2dbe39c7fba86ec to your computer and use it in GitHub Desktop.
function wpmayor_filter_image_sizes( $sizes) {
unset( $sizes['thumbnail']);
unset( $sizes['medium']);
unset( $sizes['large']);
unset( $sizes['wysija-newsletters-max']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'wpmayor_filter_image_sizes');
function wpmayor_custom_image_sizes($sizes) {
$myimgsizes = array(
"image-in-post" => __( "Image in Post" ),
"full" => __( "Original size" )
);
return $myimgsizes;
}
add_filter('image_size_names_choose', 'wpmayor_custom_image_sizes');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment