', function () {
      var Compressor = window.Compressor;
      var URL = window.URL || window.webkitURL;
      var image = document.getElementById('image');
      var output = document.getElementById('output');
      var xhr = new XMLHttpRequest();

      xhr.onload = function () {
        new Promise((resolve, reject) => {
          new Compressor(xhr.response, {
            success: resolve,
            error: reject,
          });
        }).then((result) => {
          console.log('Compress success');