Used By
Used By | Description |
---|---|
wp-includes/media.php: wp_calculate_image_srcset() | A helper function to calculate the image sources to include in a ‘srcset’ attribute. |
Filters an image’s ‘srcset’ sources.
(array) One or more arrays of source data to include in the 'srcset'.
(array)
(string) The URL of an image source.
(string) The descriptor type used in the image candidate string, either 'w' or 'x'.
(int) The source width if paired with a 'w' descriptor, or a pixel density value if paired with an 'x' descriptor.
(array) An array of requested width and height values.
(int) The height in pixels.
(string) The 'src' of the image.
(array) The image meta data as returned by 'wp_get_attachment_metadata()'.
(int) Image attachment ID or 0.
File: wp-includes/media.php
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_calculate_image_srcset