Disable the responsive image ‘srcset’ on WordPress 4.4

I got email from client about theme i did rtl that the gallery is nit changing main pic after u press on the thumbs and when i look at the code i found new element called srcset which was making this problem after searching google i found this temp solution for this all u need to d o is to add this code into functions.php in your theme

add_filter( 'max_srcset_image_width', create_function( '', 'return 1;' ) );