WordPress at a glance
filter is not described

wp_get_attachment_image_src filter-hook . WP 4.3.0

Filters the attachment image source result.


add_filter( 'wp_get_attachment_image_src', 'filter_function_name_3667', 10, 4 );
function filter_function_name_3667( $image, $attachment_id, $size, $icon ){
	// filter...

	return $image;

Array of image data, or boolean false if no image is available.

  • 0(string)
    Image source URL.

  • 1(int)
    Image width in pixels.

  • 2(int)
    Image height in pixels.

  • 3(true/false)
    Whether the image is a resized image.
Image attachment ID.
Requested size of image. Image size name, or array of width and height values (in that order).
Whether the image should be treated as an icon.


Since 4.3.0 Introduced.

Where the hook is called

wp-includes/media.php 993
return apply_filters( 'wp_get_attachment_image_src', $image, $attachment_id, $size, $icon );

Where in WP core the hook is used WordPress

Usage not found.