image_get_intermediate_size WordPress Filter Hook

The image_get_intermediate_size hook is used to retrieve the intermediate image size for a given image. This can be useful for creating custom image sizes or for displaying images in different sizes on different devices.

apply_filters( 'image_get_intermediate_size', array $data, int $post_id, string|int[] $size ) #

Filters the output of image_get_intermediate_size()


Description

Top ↑

See also


Top ↑

Parameters

$data

(array)Array of file relative path, width, and height on success. May also include file absolute path and URL.

$post_id

(int)The ID of the image attachment.

$size

(string|int[])Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).


Top ↑

Source

File: wp-includes/media.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.4.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.

Show More
Show More