W3cubDocs

/WordPress

apply_filters( 'wp_get_attachment_image_src', array|false $image, int $attachment_id, string|int[] $size, bool $icon )

Filters the attachment image source result.

Parameters

$image

(array|false) Array of image data, or boolean false if no image is available.

  • (string) Image source URL.
  • '1'
    (int) Image width in pixels.
  • '2'
    (int) Image height in pixels.
  • '3'
    (bool) Whether the image is a resized image.

$attachment_id

(int) Image attachment ID.

$size

(string|int[]) Requested size of image. Image size name, or array of width and height values (in that order).

$icon

(bool) Whether the image should be treated as an icon.

Source

File: wp-includes/media.php

View on Trac

Changelog

Version Description
4.3.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_src