Remove the responsive image support in WordPress 4.4

Feb 25, 2016

After updating to 4.4. many of us have a problem with the new srcset attribute. The simplest and cleanest way to remove the responsive image support is simply to add this to your theme functions.php:

function disable_srcset( $sources ) {
return false;
add_filter( 'wp_calculate_image_srcset', 'disable_srcset' );

To echo what most other folks are saying though, srcset is a good idea, and the future, but if you need a quick fix to keep your site working, the above snippet does the job without any hacking.

1 Comment. Leave new

you could just use ‘__return_false’ wordpress function instead of custom ‘disable_srcset’ function.
add_filter( ‘wp_calculate_image_srcset’, ‘__return_false’ );


Leave a Reply

Your email address will not be published. Required fields are marked *