title: Laravel 5 & Summernote - Uploaded image not showing up
body: <p>I'm trying to install summernote on my website built upon Laravel 5.  However, no matter what I do, I cannot make an uploaded image file show up on an editor.</p>
  
  <pre><code>$(document).ready(function() {
  $.ajaxSetup({
      headers: { 'X-CSRF-Token' : $('meta[name=_token]').attr('content') }
  });
  $('#summernote').summernote({
      height: 400,
      onImageUpload: function(files) {
          data = new FormData();
          data.append("image", files[0]);
          $.ajax({
              data: data,
              type: "POST",
              url: "/image/upload",
              cache: false,
              contentType: false,
              processData: false,
              success: function(url) {
                  console.log(url);
                  // trying to make the image show up here...
              }
          });
      }
  });
  </code></pre>
  
  <p>And this is php code and it works.</p>
  
  <pre><code>public function upload_image(ImageRequest $request)
  {
      if($request-&gt;hasFile('image')){
          $filename = str_random(20).'_'.$request-&gt;file('image')-&gt;getClientOriginalName();
          $image_path = base_path() . '/public/images/thread/';
          $request-&gt;file('image')-&gt;move(
              $image_path, $filename
          );
          echo $filename;    
      }
      else{
          echo 'Oh No! Uploading your image has failed.';
      }
  }
  </code></pre>
  
  <p>I'm using the most recent master version of Summernote and here's the list of things I've tried so far:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/30578916/summernote-show-images-that-have-been-uploaded-to-a-folder">Found a similar question</a> and tried what it says but no luck.</li>
  <li>Visited <a href="http://summernote.org/#/deep-dive#callbacks" rel="nofollow noreferrer">Summote API documentation</a> and tried '$summernote.summernote('insertNode', imgNode);'  but only gets error - complaning 'TypeError: a.nodeName is undefined'.</li>
  <li>Well, My codes are based on <a href="https://stackoverflow.com/questions/21628222/summernote-image-upload">this</a> but 'editor.insertImage(welEditable, url);' is already deprecated so not useful anymore.</li>
  <li><p>Tried the following codes based on #2. Basically trying to see if images from other websites can be added - assuming my image path is wrong. But not working.</p>
  
  <p>//Full path?</p>
  
  <p>$('#summernote').summernote("insertImage", '<a href="http://animalia-life.com/data_images/fish/fish1.jpg" rel="nofollow noreferrer">http://animalia-life.com/data_images/fish/fish1.jpg</a>');</p>
  
  <p>//If not, full path with 'filename' option?</p>
  
  <p>$('#summernote').summernote("insertImage", '<a href="http://animalia-life.com/data_images/fish/fish1.jpg" rel="nofollow noreferrer">http://animalia-life.com/data_images/fish/fish1.jpg</a>','filename');</p>
  
  <p>//If not, path + filename?</p>
  
  <p>$('#summernote').summernote("insertImage", '<a href="http://animalia-life.com/data_images/fish" rel="nofollow noreferrer">http://animalia-life.com/data_images/fish</a>','fish1.jpg');</p>
  
  <p>//If not, path + /  ?</p>
  
  <p>$('#summernote').summernote("insertImage", '<a href="http://animalia-life.com/data_images/fish/" rel="nofollow noreferrer">http://animalia-life.com/data_images/fish/</a>','fish1.jpg');</p></li>
  <li><p>Tried if data image can be added, and <strong>IT WORKS. BUT WHY.</strong></p>
  
  <p>//data image?</p>
  
  <p>$('#summernote').summernote("insertImage", 'data:image/jpeg;base64,/9j/4AAQSkZ...blahblah....');</p></li>
  </ol>
  
  <p>At this point, I learned that <strong>$('#summernote').summernote("insertImage", ... )</strong>  is actually working but the image url parameter is possibly not.  Has anyone successfully implemented this feature with the latest version of Summernote? or... Am I missing something here?</p>