code: function ($image) {
        var href;
  
        if ($image[0].nodeName === "A") {
          href = $image.attr('href');
        } else {
          href = $image.parent().attr('href');
        }
  
        this.preload($image);
  
        if (href) return href;
        return $image.attr('src');
      }
docs: image loading and preloading