Last active
January 29, 2020 05:20
-
-
Save tongdaitructuyen/acc109b31ae3b111bd5916523baac377 to your computer and use it in GitHub Desktop.
Remove WordPress's default image sizes
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
//* Gafaba.com: - Remove WordPress's default image sizes | https://gafaba.com/ | |
function remove_default_image_sizes( $sizes) { | |
unset( $sizes['large']); | |
unset( $sizes['thumbnail']); | |
unset( $sizes['medium']); | |
unset( $sizes['medium_large']); | |
unset( $sizes['1536x1536']); | |
unset( $sizes['2048x2048']); | |
return $sizes; | |
} | |
add_filter('intermediate_image_sizes_advanced', 'remove_default_image_sizes'); | |
//* END - Gafaba.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Source: https://gafaba.com/cach-ngan-wordpress-tu-tao-cac-anh-con-mac-dinh/