public static @Nullable ImageInfoReader.Info getImageInfo(final @NotNull XmlTag tag) {
      return CachedValuesManager.getCachedValue(tag, () -> {
        PsiElement srcValue = JBIterable.from(HtmlAttributeValueProvider.EP_NAME.getExtensionList())
          .filterMap(it -> it.getCustomAttributeValue(tag, SRC_ATTR_NAME))
          .first();
        if (srcValue == null) {
          var attr = tag.getAttribute(SRC_ATTR_NAME, null);
          srcValue = attr != null ? attr.getValueElement() : null;
        }
        if (srcValue != null) {
          final PsiFile psiFile = FileReferenceUtil.findFile(srcValue);
          if (psiFile != null) {
            final VirtualFile virtualFile = psiFile.getVirtualFile();
            if (virtualFile instanceof VirtualFileWithId) {
              ImageInfo value = ImageInfoIndex.getInfo(virtualFile, tag.getProject());
              if (value == null) return null;
              return CachedValueProvider.Result.create(
                new ImageInfoReader.Info(value.width, value.height, value.bpp, IfsUtil.isSVG(virtualFile)),
                srcValue,
                virtualFile
              );
            }
          }
          final String srcValueText = doIfNotNull(srcValue.getText(), StringUtil::unquoteString);
          if (srcValueText != null && URLUtil.isDataUri(srcValueText)) {
            final byte[] bytesFromDataUri = URLUtil.getBytesFromDataUri(srcValueText);
            if (bytesFromDataUri != null) {
              try {
                ImageInfoReader.Info info = ImageInfoReader.getInfo(bytesFromDataUri);
                if (info != null) {
                  return CachedValueProvider.Result.create(info, srcValue);
                }
              }
              catch (Exception ignored) {
              }
            }
          }
        }
        return CachedValueProvider.Result.create(null, tag);
      });
    }
public static @Nullable ImageInfoReader.Info getImageInfo(final @NotNull XmlTag tag)