diff --git a/editable-image.js b/editable-image.js index 7b7533e..8b9ccb6 100644 --- a/editable-image.js +++ b/editable-image.js @@ -81,18 +81,9 @@ class EditableImage extends IgniteElement { if (this.fileInput.files.length > 0) { var file = this.fileInput.files[0]; - //Create a reader to read in the file. - var reader = new FileReader(); - reader.onload = (event) => { - this.source = event.target.result; + this.source = URL.createObjectURL(file); - //Invoke a native change event now that we have - //the image file ready. - this.dispatchEvent(new Event("change")); - }; - - //Read it. - reader.readAsDataURL(file); + this.dispatchEvent(new Event("change")); } }