jQuery(document).ready( function($){
    jQuery("#bttnImage").on("click",function(){
        var images = wp.media({
            title: "upload Image",
            multiple: false
        }).open().on("select", function(e){
            var uploadedImages = images.state().get("selection");
            var selectedImages = uploadedImages.toJSON();

            jQuery.each(selectedImages, function(index,image){
                //console.log(image.sizes.thumbnail.url);
                jQuery("#bttnImage").attr("src", image.url)
                jQuery("#getSlider").attr("value", image.url)
            })
        })
    })
})