intermediate_image_sizes_advanced WordPress Filter Hook

The intermediate_image_sizes_advanced hook allows you to control the image sizes that are generated when an image is uploaded. This hook gives you the ability to set the image sizes for specific image dimensions.

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

Filters the image sizes automatically generated when uploading an image.


Parameters

$new_sizes

(array)Associative array of image sizes to be created.

$image_meta

(array)The image meta data: width, height, file, sizes, etc.

$attachment_id

(int)The attachment post ID for the image.


Top ↑

Source

File: wp-admin/includes/image.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.3.0Added the $attachment_id argument.
4.4.0Added the $image_meta argument.
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.