WP 4.9 media upload issue on insert to post


Anyone experiencing this issue? My metabox upload field suddenly not working on latest WordPress version. It has a conflict on “Add Media” insert to post button. I used this code snippet below. It works fine on older WordPress version.

jQuery(document).ready(function() {
jQuery('#upload_image_button').click(function() {
 tb_show('', 'media-upload.php?type=image&TB_iframe=true');
 return false;
window.send_to_editor = function(html) {
 var imgurl = jQuery('img',html).attr('src');

Thanks for the help!