fallback_intermediate_image_sizes

fallback_intermediate_image_sizes

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('fallback_intermediate_image_sizes') is found 1 times:

  • /wp-admin/includes/image.php line 700
    696
    697
    698
    699
    700
    701
    702
    703
    704
    705
    706
    *
     * @param string[] $fallback_sizes An array of image size names.
     * @param array    $metadata       Current attachment metadata.
     */
    $fallback_sizes = apply_filters( 'fallback_intermediate_image_sizes', $fallback_sizes, $metadata );
     
    $registered_sizes = wp_get_registered_image_subsizes();
    $merged_sizes     = array_intersect_key( $registered_sizes, array_flip( $fallback_sizes ) );
     
    // Force thumbnails to be soft crops.
    if ( isset( $merged_sizes['thumbnail'] ) && is_array( $merged_sizes['thumbnail'] ) ) {

See this hook used in plugins: