This page redirects to an external site: https://developer.wordpress.org/reference/functions/has_image_size/
Checks if an image size name has been registered using add_image_size(). This is a boolean function, meaning it returns either TRUE or FALSE.
Since it only checks for image sizes that are registered via add_image_size() function, core image sizes namely small, medium, medium_large and large will not be considered. Hence, checking for a core image size using has_image_size() will always return FALSE.
<?php has_image_size($name); ?>
In a theme's functions.php file combined with remove_image_size():
add_action('after_setup_theme', 'remove_registered_image_size');
function remove_registered_image_size() {
if(has_image_size('image-name')) {
remove_image_size('image-name');
}
}
has_image_size() is located in wp-includes/media.php.