Code-Snippets-Functions/Execute a function on a child site/Imagify/imagify-remove-thumbs.txt

15 lines
405 B
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

defined( 'ABSPATH' ) || die( 'Cheatin uh?' );
function remove_default_image_sizes( $sizes) {
unset( $sizes['1536x1536']);
unset( $sizes['2048x2048']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'remove_default_image_sizes');
function remove_images_sizes() {
remove_image_size( '1536x1536' );
remove_image_size( '2048x2048' );
}
add_action('init', 'remove_images_sizes');