private static InputStream openImageInputStream(String filePath) throws IOException {
      InputStream stream;
      if (filePath.contains("://") && !filePath.startsWith("http")) {
        stream = new URL(filePath).openStream();
      }
      else {
        Path path = Paths.get(filePath);
        if (!path.isAbsolute()) {
          path = PathManager.getConfigDir().resolve(path);
        }
        stream = Files.newInputStream(path.normalize());
      }
      return stream;
    }
private static InputStream openImageInputStream(String filePath)