wp_get_attachment_image_src

Advertisement

Summery Summery

Filters the attachment image source result.

Syntax Syntax

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

Parameters Parameters

$image

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.

$attachment_id

Image attachment ID.

$size

Requested size of image. Image size name, or array of width and height values (in that order).

$icon

Whether the image should be treated as an icon.

Source Source

File: wp-includes/media.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.3.0 Introduced.

Advertisement

Leave a Reply