get_intermediate_image_sizes()
Gets the available intermediate image sizes.
Description Description
Return Return
(array) Returns a filtered array of image size strings.
Source Source
File: wp-includes/media.php
function get_intermediate_image_sizes() { $default_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' ); $additional_sizes = wp_get_additional_image_sizes(); if ( ! empty( $additional_sizes ) ) { $default_sizes = array_merge( $default_sizes, array_keys( $additional_sizes ) ); } /** * Filters the list of intermediate image sizes. * * @since 2.5.0 * * @param array $default_sizes An array of intermediate image sizes. Defaults * are 'thumbnail', 'medium', 'medium_large', 'large'. */ return apply_filters( 'intermediate_image_sizes', $default_sizes ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
In
the get_image_sizes()
example above – note that since WordPress 4.4 there is a new size – ‘medium_large’.Include that in the array on line 13 to prevent errors.
List available image sizes with width and height following
Expand full source codeCollapse full source code
Some examples of use of this function:
Expand full source codeCollapse full source code