Filters the image sizes generated for non-image mime types.
$fallback_sizesstring[]$metadataarraywp-admin/includes/image.php:686wp_generate_attachment_metadata()wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php:1540WP_REST_Attachments_Controller::prepare_item_for_response() * * @since 4.7.0 * * @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'] ) ) {Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.