title: Upload image on server using PHP in TinyMCE editor
body: <p>I am working on TinyMCE text editor with upload image using PHP and JS database but I am confused to send the image on the server - </p>
  
  <p>JS code - </p>
  
  <pre><code>&lt;script src='//tinymce.cachefly.net/4.2/tinymce.min.js'&gt;&lt;/script&gt;
  &lt;script&gt;
    $(document).ready(function() {
    tinymce.init({
      selector: "textarea",
      theme: "modern",
      paste_data_images: true,
      plugins: [
        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
        "searchreplace wordcount visualblocks visualchars code fullscreen",
        "insertdatetime media nonbreaking save table contextmenu directionality",
        "emoticons template paste textcolor colorpicker textpattern"
      ],
      toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
      toolbar2: "print preview media | forecolor backcolor emoticons",
      image_advtab: true,
      file_picker_callback: function(callback, value, meta) {
        if (meta.filetype == 'image') {
          $('#upload').trigger('click');
          $('#upload').on('change', function() {
            var file = this.files[0];
            var reader = new FileReader();
            reader.onload = function(e) {
              callback(e.target.result, {
                alt: ''
              });
            };
            reader.readAsDataURL(file);
          });
        }
      },
      templates: [{
        title: 'Test template 1',
        content: 'Test 1'
      }, {
        title: 'Test template 2',
        content: 'Test 2'
      }]
    });
  });
    &lt;/script&gt;
  
  </code></pre>
  
  <p>Image is not showing - 
  The showing text - </p>
  
  <p><code>&lt;img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QCyRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAE+AAUAAAACAAAAYgE/AAUAAAAGAAAAcgMBAAUAAAABAAAAolEQAAEAAAABAQAAAFERAAQAAAABAAAOxFESAAQAAAABAAAOxAAAAAAAAHolAAGGoAAAgIMAAYagAAD5/wABhqAAAIDpAAGGoAAAdTAAAYagAADqYAABhqAAADqYAAGGoAAAF28AAYagAAGGoA</code></p>
  
  <p><a href="https://i.stack.imgur.com/esEVP.png" rel="nofollow noreferrer">See image </a></p>
  
  <p>HTML  - </p>
  
  <p></p>
  
  <p>How to upload image and display on the page using PHP  -</p>
  
  <p>I tried this example - <a href="https://codepen.io/nirajmchauhan/pen/EjQLpV" rel="nofollow noreferrer">https://codepen.io/nirajmchauhan/pen/EjQLpV </a></p>
  
  <p>How to upload an image on the server and retrieve with the image blob link </p>