WordPress disable srcset responsive images

Luckily you can very easily disable this feature by adding this into your themes functions.php:

function remove_max_srcset_image_width( $max_width ) {
    return false;
}
add_filter( 'max_srcset_image_width', 'remove_max_srcset_image_width' );
function wdo_disable_srcset( $sources ) {
    return false;
}
add_filter( 'wp_calculate_image_srcset', 'wdo_disable_srcset' );
See also  Checkbox to hide Related Products in WooCommerce

Leave a Reply

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