code: function() {
      var xhr = new XMLHttpRequest();
      var url = assetsBaseUrl + assetsRelativeUrl['images'];
  
      // @todo Remove the sync call and use a callback
      xhr.open('GET', url);
  
      xhr.onload = () => {
        var data = JSON.parse(xhr.responseText);
        this.images = data.images;
        this.images.forEach(image => {
          image.fullPath = assetsBaseUrl + data.basepath.images + image.path;
          image.fullThumbPath =
            assetsBaseUrl + data.basepath.images_thumbnails + image.thumbnail;
        });
        Events.emit('assetsimagesload', this.images);
      };
      xhr.onerror = () => {
        console.error('Error loading registry file.');
      };
      xhr.send();
  
      this.hasLoaded = true;
    }
docs: XHR the assets JSON.