get_intermediate_image_sizes

Gets the available intermediate image sizes.

Description

(array) get_intermediate_image_sizes(); 

Returns (array)

Returns a filtered array of image size strings.


Usage

  1. if ( !function_exists( 'get_intermediate_image_sizes' ) ) { 
  2. require_once ABSPATH . WPINC . '/media.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_intermediate_image_sizes(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/media.php  
  1. function get_intermediate_image_sizes() { 
  2. $_wp_additional_image_sizes = wp_get_additional_image_sizes(); 
  3. $image_sizes = array('thumbnail', 'medium', 'medium_large', 'large'); // Standard sizes 
  4. if ( ! empty( $_wp_additional_image_sizes ) ) { 
  5. $image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) ); 
  6.  
  7. /** 
  8. * Filters the list of intermediate image sizes. 
  9. * @since 2.5.0 
  10. * @param array $image_sizes An array of intermediate image sizes. Defaults 
  11. * are 'thumbnail', 'medium', 'medium_large', 'large'. 
  12. */ 
  13. return apply_filters( 'intermediate_image_sizes', $image_sizes );