wpseek.com
A WordPress-centric search engine for devs and theme authors



has_image_size › WordPress Function

Since3.9.0
Deprecatedn/a
has_image_size ( $name )
Parameters:
  • (string) $name The image size to check.
    Required: Yes
Returns:
  • (bool) True if the image size exists, false if not.
Defined at:
Codex:

Checks if an image size exists.



Source

function has_image_size( $name ) {
	$sizes = wp_get_additional_image_sizes();
	return isset( $sizes[ $name ] );
}