@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    final int offset = editor.getCaretModel().getOffset();
    final XmlTag tag = getTag(file, myUseElementToTheLeft ? offset - 1 : offset);
    if (tag == null) {
      return;
    }

    final ImageInfo imageInfo = getImageInfo(tag);
    if (imageInfo != null && imageInfo.height != 0 && imageInfo.width != 0) {
      tag.setAttribute(HtmlReferenceProvider.SizeReference.WIDTH_ATTR_NAME, String.valueOf(imageInfo.width));
      tag.setAttribute(HtmlReferenceProvider.SizeReference.HEIGHT_ATTR_NAME, String.valueOf(imageInfo.height));
    }
  }
@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file)