@Override
    public @Nullable PsiElement resolve() {
      final ImageInfoReader.Info info = getImageInfo();
      if (info != null && info.width != 0 && info.height != 0) {
        String text = getCanonicalText();
        if (!HtmlUtil.isHtml5Context((XmlElement)myElement) && StringUtil.endsWithChar(text, '%')) {
          return myElement;
        }

        final int myValue = getSizeValue(text, ((XmlElement)myElement));
        if (myIsWidth && info.width != myValue ||
            !myIsWidth && info.height != myValue) {
          return null;
        }
      }
      return myElement;
    }
@Override
    public @Nullable PsiElement resolve()