WordPress at Your Fingertips
filter is not described

max_srcset_image_width filter-hook . WP 4.4.0

Filters the maximum image width to be included in a 'srcset' attribute.


add_filter( 'max_srcset_image_width', 'filter_function_name_4099', 10, 2 );
function filter_function_name_4099( $max_width, $size_array ){
	// filter...

	return $max_width;
The maximum image width to be included in the 'srcset'.
Default: '2048'

An array of requested width and height values.

  • 0(int)
    The width in pixels.

  • 1(int)
    The height in pixels.

Where the hook is called

wp-includes/media.php 1331
$max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2048, $size_array );

Where in WP core the hook is used WordPress

Usage not found.