i have a little problem, i'using jquery plugin for crop and uploading images.. here is a code
$("#file").change(function(e) {
var file, img;
if ((file = this.files[0])) {
img = new Image();
img.onload = function() {
$(".cropit-preview").show();
};
img.onerror = function() {
alert( "not a valid file: " + file.type);
};
img.src = _URL.createObjectURL(file);
}
});
The above code working perfectly and after click on input button it shows me preview of the image with croping option and after croping it's create image base64 code .. Now i want user can add image using url after input url, same process will repeat but i don't know how to draw image to show preview