Summery Summery
Filters an image’s ‘srcset’ sources.
Syntax Syntax
Parameters Parameters
- $sources
-
One or more arrays of source data to include in the 'srcset'.
- 'width'
(array)- 'url'
(string) The URL of an image source. - 'descriptor'
(string) The descriptor type used in the image candidate string, either 'w' or 'x'. - 'value'
(int) The source width if paired with a 'w' descriptor, or a pixel density value if paired with an 'x' descriptor.
- 'url'
- 'width'
- $size_array
-
An array of requested width and height values.
- (int) The width in pixels.
- '1'
(int) The height in pixels.
- $image_src
-
The 'src' of the image.
- $image_meta
-
The image meta data as returned by 'wp_get_attachment_metadata()'.
- $attachment_id
-
Image attachment ID or 0.
Source Source
File: wp-includes/media.php
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |