docs: function(ql) {
  				var mimes   = ['image/jpeg', 'image/png', 'image/gif', 'image/svg+xml', 'image/x-ms-bmp'],
  			preview = ql.preview,
  			WebP, flipMime;
  		
  		// webp support
  		WebP = new Image();
  		WebP.onload = WebP.onerror = function() {
  			if (WebP.height == 2) {
  				mimes.push('image/webp');
  			}
  		};
  		WebP.src='data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA';
  		
  		// what kind of images we can display
  		$.each(navigator.mimeTypes, function(i, o) {
  			var mime = o.type;
  			
  			if (mime.indexOf('image/') === 0 && $.inArray(mime, mimes)) {
  				mimes.push(mime);
  			} 
  		});
  			
  		preview.on(ql.evUpdate, function(e) {
  			var fm   = ql.fm,
  				file = e.file,
  				showed = false,
  				dimreq = null,
  				setdim  = function(dim) {
  					var rfile = fm.file(file.hash);
  					rfile.width = dim[0];
  					rfile.height = dim[1];
  				},
  				show = function() {
  					var elm, varelm, memSize, width, height, prop;
  					
  					dimreq && dimreq.state && dimreq.state() === 'pending' && dimreq.reject();
  					if (showed) {
  						return;
  					}
  					showed = true;
  					
  					elm = img.get(0);
  					memSize = file.width && file.height? {w: file.width, h: file.height} : (elm.naturalWidth? null : {w: img.width(), h: img.height()});
  				
  					memSize && img.removeAttr('width').removeAttr('height');
  					
  					width  = file.width || elm.naturalWidth || elm.width || img.width();
  					height = file.height || elm.naturalHeight || elm.height || img.height();
  					if (!file.width || !file.height) {
  						setdim([width, height]);
  					}
  					
  					memSize && img.width(memSize.w).height(memSize.h);
  
  					prop = (width/height).toFixed(2);
  					preview.on('changesize', function() {
  						var pw = parseInt(preview.width()),
  							ph = parseInt(preview.height()),
  							w, h;
  					
  						if (prop < (pw/ph).toFixed(2)) {
  							h = ph;
  							w = Math.floor(h * prop);
  						} else {
  							w = pw;
  							h = Math.floor(w/prop);
  						}
  						img.width(w).height(h).css('margin-top', h < ph ? Math.floor((ph - h)/2) : 0);
  					
  					})
  					.trigger('changesize');
  					
  					//show image
  					img.fadeIn(100);
  				},
  				hideInfo = function() {
  					loading.remove();
  					// hide info/icon
  					ql.hideinfo();
  				},
  				url, img, loading, m;
  
  			if (!flipMime) {
  				flipMime = fm.arrayFlip(mimes);
  			}
  			if (flipMime[file.mime] && ql.dispInlineRegex.test(file.mime)) {
  				// this is our file - stop event propagation
  				e.stopImmediatePropagation();
  
  				loading = $('<div class="elfinder-quicklook-info-data"> '+fm.i18n('nowLoading')+'<span class="elfinder-info-spinner"></div>').appendTo(ql.info.find('.elfinder-quicklook-info'));
  
  				url = fm.openUrl(file.hash);
  				
  				img = $('<img/>')
  					.hide()
  					.appendTo(preview)
  					.on('load', function() {
  						hideInfo();
  						show();
  					})
  					.on('error', function() {
  						loading.remove();
  					})
  					.attr('src', url);
  				
  				if (file.width && file.height) {
  					show();
  				} else if (file.size > (ql.options.getDimThreshold || 0)) {
  					dimreq = fm.request({
  						data : {cmd : 'dim', target : file.hash},
  						preventDefault : true
  					})
  					.done(function(data) {
  						if (data.dim) {
  							var dim = data.dim.split('x');
  							file.width = dim[0];
  							file.height = dim[1];
  							setdim(dim);
  							show();
  						}
  					});
  				}
  			}
  			
  		});
  	}