Set max srcset image to 2x

/**
 * Max srcset image size
 */
function be_max_srcset_image_size( $max_width, $sizes ) {
	return 2 * $sizes[0];
}
add_filter( 'max_srcset_image_width', 'be_max_srcset_image_size', 10, 2 );
Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk