code: function setImage(image, img) {
    if (!image.hasLoaded) {
      image.hasLoaded = true;
  
      setTimeout(function() {
        image.element.className += ' loaded';
      }, 100);
    }
  
    image.trigger('load', img);
  
    if (image.element.tagName.toLowerCase() === 'img') {
      return setImageTag(image, img);
    } else {
      return setDivTag(image, img);
    }
  }
docs: Set the image on the element.
  @param {Element} img Image element.