Front-end Image Upload with Preview – Is this Possible in WP?
Just add this scripts in header <script src=”http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js”></script> <script> var blank=”http://upload.wikimedia.org/wikipedia/commons/c/c0/Blank.gif”; function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $(‘#img_prev’) .attr(‘src’, e.target.result) .height(100); }; reader.readAsDataURL(input.files[0]); } else { var img = input.value; $(‘#img_prev’).attr(‘src’,img).height(200); } $(“#x”).show().css(“margin-right”,”10px”); } $(document).ready(function() { $(“#x”).click(function() { $(“#img_prev”).attr(“src”,blank); $(“#x”).hide(); }); }); </script> … Read more