public static @Nullable Path getLibLocation() {
    String platformName;
    if (SystemInfo.isWindows) platformName = "win";
    else if (SystemInfo.isMac) platformName = "mac";
    else if (SystemInfo.isLinux) platformName = "linux";
    else return null;
    var relativePath = "lib/libwebp/" + platformName + '/' + System.mapLibraryName("webp_jni");

    // A terrible hack for dev environment.
    var local = Path.of(PluginPathManager.getPluginHomePath("webp"), relativePath);
    if (Files.exists(local)) return local;

    var resource = PluginPathManager.getPluginResource(WebpNativeLibHelper.class, relativePath);
    return resource != null ? resource.toPath().toAbsolutePath() : null;
  }
public static @Nullable Path getLibLocation()