code: function(file) {
        var defer = new $.Deferred(),
          size = file.size,
          $image = $('<img>'),
          onImageLoaded = function() {
  
            log('File Loaded:' + src);
            _bytesLoaded += size;
            onElementLoaded(file, this);
            // removing the file from the array
            _files[_currentSegment].splice(0, 1);
            updatePercentage();
            defer.resolve();
  
          },
          onImageError = function() {
            log('File load error : ' + src);
            _bytesLoaded += size;
            // removing the file from the array
            _files[_currentSegment].splice(0, 1);
            updatePercentage();
            defer.resolve();
          },
          src;
  
        // load the svg or the fallback image
        if (file.source.toString() === '[object Object]') {
          if (file.source.svg && _support.svg) {
            src = file.source.svg;
          } else if (file.source.fallback) {
            src = file.source.fallback;
          }
        } else {
          src = file.source;
        }
  
        $image.on('load', onImageLoaded);
        $image.on('error', onImageError);
        $image.attr('src', src);
  
        // preventing a memory leak
        $image = null;
  
        return defer.promise();
      }
docs: /*
  
  @description Load any kind of image
  @param file: object