On this page
apply_filters( 'max_srcset_image_width', int $max_width, int[] $size_array )
Filters the maximum image width to be included in a ‘srcset’ attribute.
Parameters
$max_widthint-
The maximum image width to be included in the
'srcset'. Default'2048'. $size_arrayint[]-
An array of requested width and height values.
- int
The width in pixels.
1intThe height in pixels.
- int
Source
File: wp-includes/media.php. View all references
$max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2048, $size_array );
Related
Used By
| Used By | Description |
|---|---|
| wp_calculate_image_srcset() wp-includes/media.php | A helper function to calculate the image sources to include in a ‘srcset’ attribute. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/max_srcset_image_width