wppaste
WordPress

apply_filters( 'intermediate_image_sizes_advanced', array $new_sizes, array $image_meta, int $attachment_id )

Since
2.9.0, 4.4.0, 5.3.0
Filters the image sizes automatically generated when uploading an image.

Compatibility

WordPress
since 5.3.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$new_sizesarray
Associative array of image sizes to be created.
$image_metaarray
The image meta data: width, height, file, sizes, etc.
$attachment_idint
The attachment post ID for the image.

Where this hook fires · 1

  • wp-admin/includes/image.php:410wp_create_image_subsizes()

Changelog

Introduced in 2.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

5.3.0
Added the $attachment_id argument.from the docblock
4.4.0
Added the $image_meta argument.from the docblock
2.9.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.