docs: function updateImageSizeHTML(editor, model) {
  	const pos = editor.getCursorBufferPosition();
  	const src = getImageSrcHTML( getImageHTMLNode(editor, model, pos) );
  
  	if (!src) {
  		return Promise.reject(new Error('No valid image source'));
  	}
  
  	locateFile(editor, src)
  	.then(getImageSize)
  	.then(size => {
  		// since this action is asynchronous, we have to ensure that editor wasn’t
  		// changed and user didn’t moved caret outside <img> node
  		const img = getImageHTMLNode(editor, model, pos);
  		if (getImageSrcHTML(img) === src) {
  			updateHTMLTag(editor, img, size.width, size.height);
  		}
  	})
  	.catch(err => console.warn('Error while updating image size:', err));
  }