Skip to content

Instantly share code, notes, and snippets.

@benpearson
Created January 9, 2025 04:29
Show Gist options
  • Save benpearson/c6c5a033620683b8829f228542ae52c6 to your computer and use it in GitHub Desktop.
Save benpearson/c6c5a033620683b8829f228542ae52c6 to your computer and use it in GitHub Desktop.
Wordpress: Increase the maximum image width to be included in a ‘srcset’ attribute
// Increase the maximum image width to be included in a ‘srcset’ attribute (default is 1600px)
function dt_max_srcset_image_width()
{
return 2000;
}
// add_filter( 'max_srcset_image_width', 'dt_max_srcset_image_width', 10 , 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment