-
-
Save jcamp/519c745384b73794e2dbe39c7fba86ec to your computer and use it in GitHub Desktop.
Wordpress Remove Image Sizes http://www.wpmayor.com/remove-image-sizes-in-wordpress/
This file contains 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
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