0

I am using some image cropping plugin that returning a long base 64 URL which is hard to decode and when I am try its returning some long character which are data:image/png;base64, then some long string

Here what I made

JsFiddle

<script type="text/javascript">
    var src = $('#img1').attr('src');
    $("#image").val(src);
</script>

What I want is the URL of that image source in input field with original name and extension.

Community
  • 1
  • 1
  • Maybe duplicate? https://stackoverflow.com/questions/21227078/convert-base64-to-image-in-javascript-jquery – mscdeveloper Jul 11 '18 at 12:26
  • where is this `with original name and extension` you require? is it conjured using dark majicks? buy the way - your fiddle is invalid and pointless - no jquery, and you've put a script tag in the script area! and you have no element with id img1 – Jaromanda X Jul 11 '18 at 12:28
  • [this](http://jsfiddle.net/Lrqm7k54/7/) at least does something – Jaromanda X Jul 11 '18 at 12:31
  • oh, and that base64 data URL is as readable as it gets - do you understand what a data URL even is? https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs – Jaromanda X Jul 11 '18 at 12:33

0 Answers0